Skip to content

Commit 1ac0e70

Browse files
committed
Update tests for new methods
1 parent 1ad1ed2 commit 1ac0e70

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

openprocurement_client/tests/test_registry_client.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_get_asset(self):
9696
asset = self.client.get_asset(TEST_ASSET_KEYS.asset_id)
9797
self.assertEqual(asset, self.asset)
9898

99-
def test_patch_asset(self):
99+
def test_patch_resource_item(self):
100100
setup_routing(self.app, routes=["asset_patch"])
101101
asset_id = self.asset.data.id
102102
patch_data = {'data': {'description': 'test_patch_asset'}}
@@ -106,6 +106,16 @@ def test_patch_asset(self):
106106
self.assertEqual(patched_asset.data.description,
107107
patch_data['data']['description'])
108108

109+
def test_patch_asset(self):
110+
setup_routing(self.app, routes=["asset_patch"])
111+
asset_id = self.asset.data.id
112+
patch_data = {'data': {'description': 'test_patch_asset'}}
113+
patched_asset = self.client.patch_asset(asset_id,
114+
patch_data)
115+
self.assertEqual(patched_asset.data.id, self.asset.data.id)
116+
self.assertEqual(patched_asset.data.description,
117+
patch_data['data']['description'])
118+
109119

110120
class LotsRegistryTestCase(BaseTestClass):
111121
def setUp(self):
@@ -136,7 +146,7 @@ def test_get_lot(self):
136146
lot = self.client.get_lot(TEST_LOT_KEYS.lot_id)
137147
self.assertEqual(lot, self.lot)
138148

139-
def test_patch_lot(self):
149+
def test_patch_resource_item(self):
140150
setup_routing(self.app, routes=["lot_patch"])
141151
lot_id = self.lot.data.id
142152
patch_data = {'data': {'description': 'test_patch_lot'}}
@@ -145,6 +155,15 @@ def test_patch_lot(self):
145155
self.assertEqual(patched_lot.data.description,
146156
patch_data['data']['description'])
147157

158+
def test_patch_lot(self):
159+
setup_routing(self.app, routes=["lot_patch"])
160+
lot_id = self.lot.data.id
161+
patch_data = {'data': {'description': 'test_patch_lot'}}
162+
patched_lot = self.client.patch_lot(lot_id, patch_data)
163+
self.assertEqual(patched_lot.data.id, lot_id)
164+
self.assertEqual(patched_lot.data.description,
165+
patch_data['data']['description'])
166+
148167

149168
def suite():
150169
suite = unittest.TestSuite()

0 commit comments

Comments
 (0)