mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-24 02:24:10 +03:00
Correct schema write test (#1416)
<Mock>.called_once() just returns a Mock, so assert <Mock>.called_once() always passes. We want <Mock>.assert_called_once().
This commit is contained in:
parent
63fd98393f
commit
38709d8396
|
@ -46,7 +46,7 @@ def test_generate_graphql_file_on_call_graphql_schema():
|
|||
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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user