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 ffcfaef commit 90c9e90Copy full SHA for 90c9e90
example/tests/test_parsers.py
@@ -52,3 +52,21 @@ def test_parse_invalid_data(self):
52
53
with self.assertRaises(ParseError):
54
parser.parse(stream, None, self.parser_context)
55
+
56
+ def test_parse_invalid_data_key(self):
57
+ parser = JSONParser()
58
59
+ string = json.dumps({
60
+ 'data': [{
61
+ 'id': 123,
62
+ 'type': 'Blog',
63
+ 'attributes': {
64
+ 'json-value': {'JsonKey': 'JsonValue'}
65
+ },
66
+ }]
67
+ })
68
+ stream = BytesIO(string.encode('utf-8'))
69
70
+ with self.assertRaises(ParseError):
71
+ parser.parse(stream, None, self.parser_context)
72
0 commit comments