diff --git a/simple_history/tests/tests/test_models.py b/simple_history/tests/tests/test_models.py index 8bb92ec2..af10f4d6 100644 --- a/simple_history/tests/tests/test_models.py +++ b/simple_history/tests/tests/test_models.py @@ -950,6 +950,12 @@ def test_delete_with_deferred_fields(self): Poll.objects.create(question="what's up sis?", pub_date=today) Poll.objects.only("id").first().delete() Poll.objects.defer("question").all().delete() + # Make sure bypass logic runs + Place.objects.create(name="cool place") + Place.objects.defer("name").first().delete() + with self.modify_settings(SIMPLE_HISTORY_ENABLED=False): + Place.objects.create(name="cool place") + Place.objects.defer("name").all().delete() def test_history_with_custom_queryset(self): PollWithQuerySetCustomizations.objects.create(