Skip to content

Commit

Permalink
chore: More specific assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
last-partizan authored and francoisfreitag committed Mar 21, 2023
1 parent a39aa69 commit 51a59f6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_django.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,8 +1014,15 @@ class Meta:

WithRelationFactory.create()

# Called only once for WithRelationFactory.
self.handlers.post_save.assert_called_once()
self.handlers.post_save.assert_called_once_with(
signal=mock.ANY,
sender=models.WithRelation,
instance=mock.ANY,
created=True,
update_fields=None,
raw=False,
using="default",
)

def test_class_decorator_build(self):
@factory.django.mute_signals(signals.pre_save, signals.post_save)
Expand Down

0 comments on commit 51a59f6

Please sign in to comment.