Refs #27804 -- Used subTest() in admin_scripts invalid name tests.
This commit is contained in:
parent
b709d70130
commit
10b0fd1576
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue