Skip to content

Commit e712089

Browse files
committed
Improved unknown field test
Detailed GraphQL-js commit: graphql/graphql-js@20694e4
1 parent d540fdf commit e712089

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/core_execution/test_variables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,15 +245,15 @@ def test_errors_on_addition_of_input_field_of_incorrect_type(self):
245245
}
246246

247247
def test_errors_on_addition_of_unknown_input_field(self):
248-
params = {'input': {'a': 'foo', 'b': 'bar', 'c': 'baz', 'f': 'dog'}}
248+
params = {'input': {'a': 'foo', 'b': 'bar', 'c': 'baz', 'extra': 'dog'}}
249249

250250
with raises(GraphQLError) as excinfo:
251251
check(self.doc, {}, params)
252252

253253
assert format_error(excinfo.value) == {
254254
'locations': [{'column': 13, 'line': 2}],
255255
'message': 'Variable "$input" got invalid value {}.\n'
256-
'In field "f": Unknown field.'.format(stringify(params['input']))
256+
'In field "extra": Unknown field.'.format(stringify(params['input']))
257257
}
258258

259259

0 commit comments

Comments
 (0)