summaryrefslogtreecommitdiff
path: root/tests/migrate_signals
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-01-12 22:20:53 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-01-12 22:24:33 +0100
commitd562527a160f420c6af0d2736ad4e6c87b0d2ef1 (patch)
tree24b95e7c8648b2789684e9f1e4f54fe8e187c94e /tests/migrate_signals
parentd674fe6dee16735dd2670243153326806b7e6cb0 (diff)
downloaddjango-d562527a160f420c6af0d2736ad4e6c87b0d2ef1.tar.gz
Fixed #21477 -- Renamed db to using in pre/post_migrate signals.
Diffstat (limited to 'tests/migrate_signals')
-rw-r--r--tests/migrate_signals/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/migrate_signals/tests.py b/tests/migrate_signals/tests.py
index 7e1d5be103..a18d9fe076 100644
--- a/tests/migrate_signals/tests.py
+++ b/tests/migrate_signals/tests.py
@@ -6,7 +6,7 @@ from django.utils import six
APP_CONFIG = apps.get_app_config('migrate_signals')
-PRE_MIGRATE_ARGS = ['app_config', 'verbosity', 'interactive', 'db']
+PRE_MIGRATE_ARGS = ['app_config', 'verbosity', 'interactive', 'using']
MIGRATE_DATABASE = 'default'
MIGRATE_VERBOSITY = 1
MIGRATE_INTERACTIVE = False
@@ -35,7 +35,7 @@ class OneTimeReceiver(object):
def __call__(self, signal, sender, **kwargs):
# Although test runner calls migrate for several databases,
# testing for only one of them is quite sufficient.
- if kwargs['db'] == MIGRATE_DATABASE:
+ if kwargs['using'] == MIGRATE_DATABASE:
self.call_counter = self.call_counter + 1
self.call_args = kwargs
# we need to test only one call of migrate
@@ -74,4 +74,4 @@ class MigrateSignalTests(TestCase):
self.assertEqual(args['app_config'], APP_CONFIG)
self.assertEqual(args['verbosity'], MIGRATE_VERBOSITY)
self.assertEqual(args['interactive'], MIGRATE_INTERACTIVE)
- self.assertEqual(args['db'], 'default')
+ self.assertEqual(args['using'], 'default')