Conditions | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | # !/usr/bin/python |
||
42 | def test_response(self): |
||
43 | """Test the conversion to the APIResponse object and the json.dumps |
||
44 | |||
45 | :return: |
||
46 | """ |
||
47 | response = SearchResponse(success=True, checked_time=time()) |
||
48 | response.add_item(self._item) |
||
49 | json_response_dump = json.dumps(response.__dict__) |
||
50 | api_response = APIResponse(json_response_dump) |
||
51 | self.assertEqual(api_response.data.status, True) |
||
52 | |||
57 |