From 31bebc558bf9a647c77ff6b372fc199008e99c1c Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Thu, 4 Feb 2021 06:30:53 +0100 Subject: [PATCH] Used subTest() in migrate_signals.tests.MigrateSignalTests.test_args(). --- tests/migrate_signals/tests.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/migrate_signals/tests.py b/tests/migrate_signals/tests.py index 9611fc90e1..e3d00ee9e3 100644 --- a/tests/migrate_signals/tests.py +++ b/tests/migrate_signals/tests.py @@ -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):