def test004_list_of_objects_response(self): result = match(expected='{"track":{"title":"Eyesight To The Blind",' ' "duration":"2:50"}}', actual=MOCK_JSON_LIST) self.assertFalse(result)
def test005_dict_of_objects_response(self): result = match(expected='{"entry-1" : {"name":"first entry"}}', actual=MOCK_JSON_DICT) self.assertTrue(result)
def test003_list_of_objects_response(self): result = match(expected='{"track": {"title": "Shame Shame Shame",' ' "duration":"3:10"}}', actual=MOCK_JSON_LIST) self.assertTrue(result)
def test002_one_object_response(self): result = match(expected='{"name": "James", "profession": ' '"secret agent"}', actual=MOCK_JSON_ONE_OBJECT) self.assertFalse(result)
def test001_one_object_response(self): result = match(expected='{"name": "Bond"}', actual=MOCK_JSON_ONE_OBJECT) self.assertTrue(result)
def test008_dict_of_list_of_objects_response(self): result = match(expected='{"glossary": {"GlossDiv": ' '{"GlossList": {"GlossEntry": {"GlossDef": ' '{"GlossSeeAlso": [{"value": [{"GML":"test"}], "type": ""}]}}}}}}', actual=MOCK_JSON_DICT_OF_LIST) self.assertFalse(result)
def test006_dict_of_objects_response(self): result = match(expected='{"entry-4" : {"name":"fourth entry"}}', actual=MOCK_JSON_DICT) self.assertFalse(result)