summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
authorMounir Messelmeni <messelmeni.mounir@gmail.com>2015-06-13 15:41:56 +0200
committerTim Graham <timograham@gmail.com>2015-06-16 07:08:04 -0400
commite6dd7f995a5a785a5aa12378df209314b1d77d93 (patch)
treec809ba04011ef7c9496c99d8b6ee5542aa443448 /tests/admin_scripts
parentc5eca746198943a58e6a2377211428fda3f4d878 (diff)
Fixed #24971 -- Made startapp generate an apps.py
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 4b17690c1d..c635de05df 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -592,6 +592,14 @@ class DjangoAdminSettingsDirectory(AdminScriptTestCase):
self.addCleanup(shutil.rmtree, app_path)
self.assertNoOutput(err)
self.assertTrue(os.path.exists(app_path))
+ with open(os.path.join(app_path, 'apps.py'), 'r') as f:
+ content = f.read()
+ self.assertIn("class SettingsTestConfig(AppConfig)", content)
+ self.assertIn("name = 'settings_test'", content)
+ with open(os.path.join(app_path, '__init__.py'), 'r') as f:
+ content = f.read()
+ expected_content = "default_app_config = 'settings_test.apps.SettingsTestConfig'"
+ self.assertIn(expected_content, content)
if not PY3:
with open(os.path.join(app_path, 'models.py'), 'r') as fp:
content = fp.read()