Conditions | 1 |
Total Lines | 32 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
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 | app_id=730, |
||
34 | class_id=12345, |
||
35 | context_id=2, |
||
36 | instance_id=54321, |
||
37 | price=109999, |
||
38 | wear_value=0.14305446, |
||
39 | image="some_item_image_link", |
||
40 | inspect_link="some_steam_inspect_link" |
||
41 | ) |
||
42 | |||
43 | item_1.add_sticker(self._sticker) |
||
44 | |||
45 | item_2 = Item( |
||
46 | app_id=730, |
||
47 | class_id=12345, |
||
48 | context_id=2, |
||
49 | instance_id=54321, |
||
50 | price=109999, |
||
51 | wear_value=0.14305446, |
||
52 | image="some_item_image_link", |
||
53 | inspect_link="some_steam_inspect_link", |
||
54 | stickers=[self._sticker] |
||
55 | ) |
||
56 | |||
57 | # check if stickers added at a later moment are added properly |
||
58 | self.assertEqual(json.dumps(item_1.__dict__), json.dumps(item_2.__dict__)) |
||
59 | |||
64 |