Used subTest() in migrate_signals.tests.MigrateSignalTests.test_args().
This commit is contained in:
parent
5d9b065d3f
commit
31bebc558b
|
@ -73,15 +73,16 @@ class MigrateSignalTests(TransactionTestCase):
|
|||
)
|
||||
|
||||
for receiver in [pre_migrate_receiver, post_migrate_receiver]:
|
||||
args = receiver.call_args
|
||||
self.assertEqual(receiver.call_counter, 1)
|
||||
self.assertEqual(set(args), set(SIGNAL_ARGS))
|
||||
self.assertEqual(args['app_config'], APP_CONFIG)
|
||||
self.assertEqual(args['verbosity'], MIGRATE_VERBOSITY)
|
||||
self.assertEqual(args['interactive'], MIGRATE_INTERACTIVE)
|
||||
self.assertEqual(args['using'], 'default')
|
||||
self.assertEqual(args['plan'], [])
|
||||
self.assertIsInstance(args['apps'], migrations.state.StateApps)
|
||||
with self.subTest(receiver=receiver):
|
||||
args = receiver.call_args
|
||||
self.assertEqual(receiver.call_counter, 1)
|
||||
self.assertEqual(set(args), set(SIGNAL_ARGS))
|
||||
self.assertEqual(args['app_config'], APP_CONFIG)
|
||||
self.assertEqual(args['verbosity'], MIGRATE_VERBOSITY)
|
||||
self.assertEqual(args['interactive'], MIGRATE_INTERACTIVE)
|
||||
self.assertEqual(args['using'], 'default')
|
||||
self.assertEqual(args['plan'], [])
|
||||
self.assertIsInstance(args['apps'], migrations.state.StateApps)
|
||||
|
||||
@override_settings(MIGRATION_MODULES={'migrate_signals': 'migrate_signals.custom_migrations'})
|
||||
def test_migrations_only(self):
|
||||
|
|
Loading…
Reference in New Issue