We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d2c5ee commit 17e9bd3Copy full SHA for 17e9bd3
graphene_django/tests/test_types.py
@@ -1,4 +1,4 @@
1
-from mock import patch
+from mock import Mock, patch
2
3
from graphene import Interface, ObjectType, Schema
4
from graphene.relay import Node
@@ -38,7 +38,11 @@ def test_django_interface():
38
39
@patch('graphene_django.tests.models.Article.objects.get', return_value=Article(id=1))
40
def test_django_get_node(get):
41
- article = Article.get_node(1, None, None)
+ ast_mock = Mock()
42
+ ast_mock.selection_set.selections = []
43
+ info_mock = Mock(field_asts=[ast_mock])
44
+
45
+ article = Article.get_node(1, None, info_mock)
46
get.assert_called_with(pk=1)
47
assert article.id == 1
48
0 commit comments