Skip to content

Commit

Permalink
Correct schema write test (#1416)
Browse files Browse the repository at this point in the history
<Mock>.called_once() just returns a Mock, so assert <Mock>.called_once()
always passes. We want <Mock>.assert_called_once().
  • Loading branch information
kiendang authored May 27, 2023
1 parent 63fd983 commit 38709d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphene_django/tests/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Query(ObjectType):
open_mock.assert_called_once()

handle = open_mock()
assert handle.write.called_once()
handle.write.assert_called_once()

schema_output = handle.write.call_args[0][0]
assert schema_output == dedent(
Expand Down

0 comments on commit 38709d8

Please sign in to comment.