Refs #27804 -- Used subTest() in admin_scripts invalid name tests.

This commit is contained in:
Jon Dufresne 2019-02-05 18:06:13 -08:00 committed by Tim Graham
parent b709d70130
commit 10b0fd1576
1 changed files with 20 additions and 18 deletions

View File

@ -1893,6 +1893,7 @@ class StartProject(LiveServerTestCase, AdminScriptTestCase):
def test_invalid_project_name(self):
"Make sure the startproject management command validates a project name"
for bad_name in ('7testproject', '../testproject'):
with self.subTest(project_name=bad_name):
args = ['startproject', bad_name]
testproject_dir = os.path.join(self.test_dir, bad_name)
@ -2095,6 +2096,7 @@ class StartApp(AdminScriptTestCase):
def test_invalid_name(self):
"""startapp validates that app name is a valid Python identifier."""
for bad_name in ('7testproject', '../testproject'):
with self.subTest(app_name=bad_name):
args = ['startapp', bad_name]
testproject_dir = os.path.join(self.test_dir, bad_name)