11from __future__ import print_function
22from gevent import monkey
3+
34monkey .patch_all ()
45
56import mock
@@ -96,7 +97,7 @@ def test_get_asset(self):
9697 asset = self .client .get_asset (TEST_ASSET_KEYS .asset_id )
9798 self .assertEqual (asset , self .asset )
9899
99- def test_patch_asset (self ):
100+ def test_patch_resource_item (self ):
100101 setup_routing (self .app , routes = ["asset_patch" ])
101102 asset_id = self .asset .data .id
102103 patch_data = {'data' : {'description' : 'test_patch_asset' }}
@@ -106,6 +107,16 @@ def test_patch_asset(self):
106107 self .assertEqual (patched_asset .data .description ,
107108 patch_data ['data' ]['description' ])
108109
110+ def test_patch_asset (self ):
111+ setup_routing (self .app , routes = ["asset_patch" ])
112+ asset_id = self .asset .data .id
113+ patch_data = {'data' : {'description' : 'test_patch_asset' }}
114+ patched_asset = self .client .patch_asset (asset_id ,
115+ patch_data )
116+ self .assertEqual (patched_asset .data .id , self .asset .data .id )
117+ self .assertEqual (patched_asset .data .description ,
118+ patch_data ['data' ]['description' ])
119+
109120
110121class LotsRegistryTestCase (BaseTestClass ):
111122 def setUp (self ):
@@ -136,7 +147,7 @@ def test_get_lot(self):
136147 lot = self .client .get_lot (TEST_LOT_KEYS .lot_id )
137148 self .assertEqual (lot , self .lot )
138149
139- def test_patch_lot (self ):
150+ def test_patch_resource_item (self ):
140151 setup_routing (self .app , routes = ["lot_patch" ])
141152 lot_id = self .lot .data .id
142153 patch_data = {'data' : {'description' : 'test_patch_lot' }}
@@ -145,6 +156,15 @@ def test_patch_lot(self):
145156 self .assertEqual (patched_lot .data .description ,
146157 patch_data ['data' ]['description' ])
147158
159+ def test_patch_lot (self ):
160+ setup_routing (self .app , routes = ["lot_patch" ])
161+ lot_id = self .lot .data .id
162+ patch_data = {'data' : {'description' : 'test_patch_lot' }}
163+ patched_lot = self .client .patch_lot (lot_id , patch_data )
164+ self .assertEqual (patched_lot .data .id , lot_id )
165+ self .assertEqual (patched_lot .data .description ,
166+ patch_data ['data' ]['description' ])
167+
148168
149169def suite ():
150170 suite = unittest .TestSuite ()
0 commit comments