mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #23136 -- Added a message when sqlclear does nothing
This commit is contained in:
parent
5853c87a45
commit
3e241313a4
3 changed files with 15 additions and 2 deletions
|
@ -297,7 +297,8 @@ class DjangoAdminFullPathDefaultSettings(AdminScriptTestCase):
|
|||
contains the test application specified using a full path.
|
||||
"""
|
||||
def setUp(self):
|
||||
self.write_settings('settings.py', ['django.contrib.auth', 'django.contrib.contenttypes', 'admin_scripts'])
|
||||
self.write_settings('settings.py', ['django.contrib.auth', 'django.contrib.contenttypes',
|
||||
'admin_scripts', 'admin_scripts.complex_app'])
|
||||
|
||||
def tearDown(self):
|
||||
self.remove_settings('settings.py')
|
||||
|
@ -316,6 +317,13 @@ class DjangoAdminFullPathDefaultSettings(AdminScriptTestCase):
|
|||
self.assertNoOutput(err)
|
||||
self.assertOutput(out, 'CREATE TABLE')
|
||||
|
||||
def test_sqlclear_builtin_with_settings(self):
|
||||
"fulldefault: django-admin builtin commands succeed if a setting file is provided"
|
||||
args = ['sqlclear', '--settings=test_project.settings', 'complex_app']
|
||||
out, err = self.run_django_admin(args)
|
||||
self.assertNoOutput(err)
|
||||
self.assertOutput(out, '-- App creates no tables in the database. Nothing to do.')
|
||||
|
||||
def test_builtin_with_environment(self):
|
||||
"fulldefault: django-admin builtin commands succeed if the environment contains settings"
|
||||
args = ['sqlall', 'admin_scripts']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue