mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +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
|
@ -73,7 +73,10 @@ class SQLCommandsRouterTestCase(TestCase):
|
|||
for sql_command in (sql_all, sql_create, sql_delete, sql_indexes, sql_destroy_indexes):
|
||||
if sql_command is sql_delete:
|
||||
output = sql_command(app_config, no_style(), connections[DEFAULT_DB_ALIAS], close_connection=False)
|
||||
# "App creates no tables in the database. Nothing to do."
|
||||
expected_output = 1
|
||||
else:
|
||||
output = sql_command(app_config, no_style(), connections[DEFAULT_DB_ALIAS])
|
||||
self.assertEqual(len(output), 0,
|
||||
expected_output = 0
|
||||
self.assertEqual(len(output), expected_output,
|
||||
"%s command is not honoring routers" % sql_command.__name__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue