comparison nosedjango/nosedjango.py @ 8:a82369f2574e

http client tests
author Victor Ng <victor@monkeybean.ca>
date Thu, 28 Aug 2008 12:42:31 -0400
parents dfba3a3a4343
children 35178e70f1cd
comparison
equal deleted inserted replaced
7:dfba3a3a4343 8:a82369f2574e
111 # The NoseDjango test runner will reset the database between *every* 111 # The NoseDjango test runner will reset the database between *every*
112 # test case. This is more in the spirit of unittesting where there is 112 # test case. This is more in the spirit of unittesting where there is
113 # no state information passed between individual tests. 113 # no state information passed between individual tests.
114 114
115 from django.core.management import call_command 115 from django.core.management import call_command
116 from django.core.urlresolvers import clear_url_caches
116 call_command('flush', verbosity=0, interactive=False) 117 call_command('flush', verbosity=0, interactive=False)
117 118
118 if isinstance(test, nose.case.Test) and \ 119 if isinstance(test, nose.case.Test) and \
119 isinstance(test.test, nose.case.MethodTestCase) and \ 120 isinstance(test.test, nose.case.MethodTestCase) and \
120 hasattr(test.context, 'fixtures'): 121 hasattr(test.context, 'fixtures'):