Skip to content

Commit

Permalink
added to test to ensure by-pass logic is covered
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanHyatt committed Nov 20, 2024
1 parent b01aeac commit 08dad4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions simple_history/tests/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 08dad4a

Please sign in to comment.