mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #32309 -- Added test for excluding hidden directories in startproject command.
This commit is contained in:
parent
af10e97531
commit
3686077d46
@ -0,0 +1 @@
|
||||
# The {{ project_name }} should be rendered.
|
@ -2214,6 +2214,24 @@ class StartProject(LiveServerTestCase, AdminScriptTestCase):
|
||||
'Some non-ASCII text for testing ticket #18091:',
|
||||
'üäö €'])
|
||||
|
||||
def test_custom_project_template_hidden_directory_default_excluded(self):
|
||||
"""Hidden directories are excluded by default."""
|
||||
template_path = os.path.join(custom_templates_dir, 'project_template')
|
||||
args = [
|
||||
'startproject',
|
||||
'--template',
|
||||
template_path,
|
||||
'custom_project_template_hidden_directories',
|
||||
'project_dir',
|
||||
]
|
||||
testproject_dir = os.path.join(self.test_dir, 'project_dir')
|
||||
os.mkdir(testproject_dir)
|
||||
|
||||
_, err = self.run_django_admin(args)
|
||||
self.assertNoOutput(err)
|
||||
hidden_dir = os.path.join(testproject_dir, '.hidden')
|
||||
self.assertIs(os.path.exists(hidden_dir), False)
|
||||
|
||||
|
||||
class StartApp(AdminScriptTestCase):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user