Changed test_runner tests to use full python path for settings files.
This commit is contained in:
parent
1535fcfdba
commit
0fe11fca40
|
@ -186,25 +186,26 @@ class CustomTestRunnerOptionsTests(AdminScriptTestCase):
|
|||
self.remove_settings('settings.py')
|
||||
|
||||
def test_default_options(self):
|
||||
args = ['test', '--settings=settings']
|
||||
args = ['test', '--settings=test_project.settings']
|
||||
out, err = self.run_django_admin(args)
|
||||
self.assertNoOutput(err)
|
||||
self.assertOutput(out, '1:2:3')
|
||||
|
||||
def test_default_and_given_options(self):
|
||||
args = ['test', '--settings=settings', '--option_b=foo']
|
||||
args = ['test', '--settings=test_project.settings', '--option_b=foo']
|
||||
out, err = self.run_django_admin(args)
|
||||
self.assertNoOutput(err)
|
||||
self.assertOutput(out, '1:foo:3')
|
||||
|
||||
def test_option_name_and_value_separated(self):
|
||||
args = ['test', '--settings=settings', '--option_b', 'foo']
|
||||
args = ['test', '--settings=test_project.settings', '--option_b', 'foo']
|
||||
out, err = self.run_django_admin(args)
|
||||
self.assertNoOutput(err)
|
||||
self.assertOutput(out, '1:foo:3')
|
||||
|
||||
def test_all_options_given(self):
|
||||
args = ['test', '--settings=settings', '--option_a=bar', '--option_b=foo', '--option_c=31337']
|
||||
args = ['test', '--settings=test_project.settings', '--option_a=bar',
|
||||
'--option_b=foo', '--option_c=31337']
|
||||
out, err = self.run_django_admin(args)
|
||||
self.assertNoOutput(err)
|
||||
self.assertOutput(out, 'bar:foo:31337')
|
||||
|
@ -296,7 +297,7 @@ class DeprecationDisplayTest(AdminScriptTestCase):
|
|||
self.remove_settings('settings.py')
|
||||
|
||||
def test_runner_deprecation_verbosity_default(self):
|
||||
args = ['test', '--settings=settings']
|
||||
args = ['test', '--settings=test_project.settings']
|
||||
out, err = self.run_django_admin(args)
|
||||
self.assertTrue("DeprecationWarning: warning from test" in err)
|
||||
|
||||
|
|
Loading…
Reference in New Issue