mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #32734 -- Fixed validation of startapp's directory with trailing slash.
Regression in fc9566d42d.
This commit is contained in:
committed by
Mariusz Felisiak
parent
29345aecf6
commit
530f58caaa
@@ -2206,6 +2206,13 @@ class StartApp(AdminScriptTestCase):
|
||||
"another directory."
|
||||
)
|
||||
|
||||
def test_trailing_slash_in_target_app_directory_name(self):
|
||||
app_dir = os.path.join(self.test_dir, 'apps', 'app1')
|
||||
os.makedirs(app_dir)
|
||||
_, err = self.run_django_admin(['startapp', 'app', os.path.join('apps', 'app1', '')])
|
||||
self.assertNoOutput(err)
|
||||
self.assertIs(os.path.exists(os.path.join(app_dir, 'apps.py')), True)
|
||||
|
||||
def test_overlaying_app(self):
|
||||
# Use a subdirectory so it is outside the PYTHONPATH.
|
||||
os.makedirs(os.path.join(self.test_dir, 'apps/app1'))
|
||||
|
||||
Reference in New Issue
Block a user