77
77
response_dict = json.loads(response.body)
78
78
response_list = response_dict["images"]
80
expected = [{'id': '123', 'name': 'public image'},
81
{'id': '124', 'name': 'queued snapshot'},
82
{'id': '125', 'name': 'saving snapshot'},
83
{'id': '126', 'name': 'active snapshot'},
84
{'id': '127', 'name': 'killed snapshot'},
85
{'id': '128', 'name': 'deleted snapshot'},
86
{'id': '129', 'name': 'pending_delete snapshot'},
87
{'id': '130', 'name': None}]
80
expected = [{'id': 123, 'name': 'public image'},
81
{'id': 124, 'name': 'queued snapshot'},
82
{'id': 125, 'name': 'saving snapshot'},
83
{'id': 126, 'name': 'active snapshot'},
84
{'id': 127, 'name': 'killed snapshot'},
85
{'id': 128, 'name': 'deleted snapshot'},
86
{'id': 129, 'name': 'pending_delete snapshot'},
87
{'id': 130, 'name': None}]
89
89
self.assertDictListMatch(response_list, expected)
914
914
app = fakes.wsgi_app(fake_auth_context=self._get_fake_context())
915
915
res = req.get_response(app)
916
916
image_meta = json.loads(res.body)['image']
917
expected = {'id': '123', 'name': 'public image',
917
expected = {'id': 123, 'name': 'public image',
918
918
'updated': NOW_API_FORMAT,
919
919
'created': NOW_API_FORMAT, 'status': 'ACTIVE',