MCPcopy
hub / github.com/django/django / test_equal_parsing_errors

Method test_equal_parsing_errors

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

Source from the content-addressed store, hash-verified

1169 self.assertJSONEqual(json1, json2)
1170
1171 def test_equal_parsing_errors(self):
1172 invalid_json = '{"attr1": "foo, "attr2":"baz"}'
1173 valid_json = '{"attr1": "foo", "attr2":"baz"}'
1174 with self.assertRaises(AssertionError):
1175 self.assertJSONEqual(invalid_json, valid_json)
1176 with self.assertRaises(AssertionError):
1177 self.assertJSONEqual(valid_json, invalid_json)
1178
1179 def test_simple_not_equal(self):
1180 json1 = '{"attr1": "foo", "attr2":"baz"}'

Callers

nothing calls this directly

Calls 1

assertJSONEqualMethod · 0.80

Tested by

no test coverage detected