diff --git a/simple_history/tests/tests/test_admin.py b/simple_history/tests/tests/test_admin.py index 4b707706..c6a847ed 100644 --- a/simple_history/tests/tests/test_admin.py +++ b/simple_history/tests/tests/test_admin.py @@ -790,8 +790,7 @@ def test_history_view_sets_admin_user_view(self): user_model = get_user_model() admin_user_view = "admin:{}_{}_change".format( - user_model._meta.app_label, - user_model._meta.model_name + user_model._meta.app_label, user_model._meta.model_name ) context = { "title": admin.history_view_title(request, poll), @@ -833,8 +832,7 @@ def test_history_view_sets_admin_user_view_on_user_model_override(self): user_model = BucketMember admin_user_view = "admin:{}_{}_change".format( - user_model._meta.app_label, - user_model._meta.model_name + user_model._meta.app_label, user_model._meta.model_name ) context = { "title": admin.history_view_title(request, bucket_data), @@ -875,8 +873,7 @@ def test_history_view_sets_admin_user_view_on_custom_user_id_field(self): user_model = get_user_model() admin_user_view = "admin:{}_{}_change".format( - user_model._meta.app_label, - user_model._meta.model_name + user_model._meta.app_label, user_model._meta.model_name ) context = { "title": admin.history_view_title(request, instance), diff --git a/simple_history/tests/tests/test_models.py b/simple_history/tests/tests/test_models.py index 5d2ad468..fb4f5983 100644 --- a/simple_history/tests/tests/test_models.py +++ b/simple_history/tests/tests/test_models.py @@ -600,20 +600,20 @@ def test_model_with_excluded_fields(self): def test_history_user_model_is_auth_user_as_default(self): self.assertEqual( - get_user_model(), - get_history_model_for_model(Poll)._history_user_model + get_user_model(), get_history_model_for_model(Poll)._history_user_model ) def test_history_user_model_is_user_model_on_override(self): self.assertEqual( - BucketMember, - get_history_model_for_model(BucketData)._history_user_model + BucketMember, get_history_model_for_model(BucketData)._history_user_model ) def test_history_user_model_is_user_model_on_override_register(self): self.assertEqual( BucketMember, - get_history_model_for_model(BucketDataRegisterChangedBy)._history_user_model + get_history_model_for_model( + BucketDataRegisterChangedBy + )._history_user_model, ) def test_user_model_override(self): @@ -2313,9 +2313,12 @@ def test_history_user_does_not_exist(self): def test_history_user_model_is_auth_user(self): self.assertEqual( get_user_model(), - get_history_model_for_model(ExternalModelWithCustomUserIdField)._history_user_model + get_history_model_for_model( + ExternalModelWithCustomUserIdField + )._history_user_model, ) + class RelatedNameTest(TestCase): def setUp(self): self.user_one = get_user_model().objects.create( # nosec