MCPcopy
hub / github.com/django/django / test_not_equal_parsing_errors

Method test_not_equal_parsing_errors

tests/test_utils/tests.py:1190–1196  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1188 self.assertJSONNotEqual(json1, json2)
1189
1190 def test_not_equal_parsing_errors(self):
1191 invalid_json = '{"attr1": "foo, "attr2":"baz"}'
1192 valid_json = '{"attr1": "foo", "attr2":"baz"}'
1193 with self.assertRaises(AssertionError):
1194 self.assertJSONNotEqual(invalid_json, valid_json)
1195 with self.assertRaises(AssertionError):
1196 self.assertJSONNotEqual(valid_json, invalid_json)
1197
1198 def test_method_frames_ignored_by_unittest(self):
1199 try:

Callers

nothing calls this directly

Calls 1

assertJSONNotEqualMethod · 0.80

Tested by

no test coverage detected