diff --git a/graphene/relay/node.py b/graphene/relay/node.py index 6596757c..5c787ffb 100644 --- a/graphene/relay/node.py +++ b/graphene/relay/node.py @@ -101,8 +101,8 @@ class Node(AbstractNode): if only_type: assert graphene_type == only_type, ( - 'Must receive an {} id.' - ).format(graphene_type._meta.name) + 'Must receive a {} id.' + ).format(only_type._meta.name) # We make sure the ObjectType implements the "Node" interface if cls not in graphene_type._meta.interfaces: diff --git a/graphene/relay/tests/test_node.py b/graphene/relay/tests/test_node.py index 10dc5d94..df44fcb5 100644 --- a/graphene/relay/tests/test_node.py +++ b/graphene/relay/tests/test_node.py @@ -115,7 +115,7 @@ def test_node_field_only_type_wrong(): '{ onlyNode(id:"%s") { __typename, name } } ' % Node.to_global_id("MyOtherNode", 1) ) assert len(executed.errors) == 1 - assert str(executed.errors[0]) == 'Must receive an MyOtherNode id.' + assert str(executed.errors[0]) == 'Must receive a MyNode id.' assert executed.data == {'onlyNode': None} @@ -132,7 +132,7 @@ def test_node_field_only_lazy_type_wrong(): '{ onlyNodeLazy(id:"%s") { __typename, name } } ' % Node.to_global_id("MyOtherNode", 1) ) assert len(executed.errors) == 1 - assert str(executed.errors[0]) == 'Must receive an MyOtherNode id.' + assert str(executed.errors[0]) == 'Must receive a MyNode id.' assert executed.data == {'onlyNodeLazy': None}