Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @mock.patch('django_testing.models.SampleManager.filter')
- def test_filters_by_user_with_patch_and_filter_passed_in(self, filter_method):
- user = mock.Mock()
- models.Sample.objects.get_by_user(user)
- filter_method.assert_called_with(user=user)
Add Comment
Please, Sign In to add comment