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