Beispiel #1
0
 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)
Beispiel #2
0
 def test005_dict_of_objects_response(self):
     result = match(expected='{"entry-1" : {"name":"first entry"}}',
                    actual=MOCK_JSON_DICT)
     self.assertTrue(result)
Beispiel #3
0
 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)
Beispiel #4
0
 def test002_one_object_response(self):
     result = match(expected='{"name": "James", "profession": '
                             '"secret agent"}',
                    actual=MOCK_JSON_ONE_OBJECT)
     self.assertFalse(result)
Beispiel #5
0
 def test001_one_object_response(self):
     result = match(expected='{"name": "Bond"}',
                    actual=MOCK_JSON_ONE_OBJECT)
     self.assertTrue(result)
Beispiel #6
0
 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)
Beispiel #7
0
 def test006_dict_of_objects_response(self):
     result = match(expected='{"entry-4" : {"name":"fourth entry"}}',
                    actual=MOCK_JSON_DICT)
     self.assertFalse(result)