| Conditions | 1 |
| Total Lines | 36 |
| Code Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # !/usr/bin/python |
||
| 27 | def test_item(self): |
||
| 28 | """Test the conversion to the APIResponse object and the json.dumps |
||
| 29 | |||
| 30 | :return: |
||
| 31 | """ |
||
| 32 | item_1 = Item( |
||
| 33 | market_name='some_market_name', |
||
| 34 | item_id=12345, |
||
| 35 | app_id=730, |
||
| 36 | class_id=12345, |
||
| 37 | context_id=2, |
||
| 38 | instance_id=54321, |
||
| 39 | price=109999, |
||
| 40 | wear_value=0.14305446, |
||
| 41 | image="some_item_image_link", |
||
| 42 | inspect_link="some_steam_inspect_link" |
||
| 43 | ) |
||
| 44 | |||
| 45 | item_1.add_sticker(self._sticker) |
||
| 46 | |||
| 47 | item_2 = Item( |
||
| 48 | market_name='some_market_name', |
||
| 49 | item_id=12345, |
||
| 50 | app_id=730, |
||
| 51 | class_id=12345, |
||
| 52 | context_id=2, |
||
| 53 | instance_id=54321, |
||
| 54 | price=109999, |
||
| 55 | wear_value=0.14305446, |
||
| 56 | image="some_item_image_link", |
||
| 57 | inspect_link="some_steam_inspect_link", |
||
| 58 | stickers=[self._sticker] |
||
| 59 | ) |
||
| 60 | |||
| 61 | # check if stickers added at a later moment are added properly |
||
| 62 | self.assertEqual(json.dumps(item_1.__dict__), json.dumps(item_2.__dict__)) |
||
| 63 | |||
| 68 |