Re: django testing: adapt some vars in settings.py if testing

2011-11-23 Thread Gelonida N
Hi Mike, Yes this idea is simple enough. I just wondered whether there isn't a tiny risk of finding 'test' as a paramter of one of the option in some esotheric cases. For what I am doing the solution should be absolutely fine. With my habit of using ./manage.py I could even change it to if sys.

Re: django testing: adapt some vars in settings.py if testing

2011-11-23 Thread Mike Dewhirst
There was a great solution to this posted just yesterday ... import sys if 'runserver' in sys.argv: DEBUG = True else: DEBUG = False ... which suggests if 'test' in sys.argv: do this On 24/11/2011 9:53am, Gelonida N wrote: Hi, I just started reading about django testing. Now

django testing: adapt some vars in settings.py if testing

2011-11-23 Thread Gelonida N
Hi, I just started reading about django testing. Now I have a small question. Whe running tests I would like to change a few variables in settings.py, but keep all the rest identical. Example: - I might like ot change the media directory - I might like to use another db engine How can I achie