fix placement delete resource provider unit test
Change-Id: Ic0e3c6126efbbc9abf8c09110b4bcb7287503e56
This commit is contained in:
parent
854c371476
commit
a853993a1e
@ -58,13 +58,13 @@ class PlacementAPIClientTestCase(base.DietTestCase):
|
|||||||
expected_url, {'uuid': rp_uuid, 'name': 'test'},
|
expected_url, {'uuid': rp_uuid, 'name': 'test'},
|
||||||
version='1.20', global_request_id=mock.ANY)
|
version='1.20', global_request_id=mock.ANY)
|
||||||
|
|
||||||
def test_delete_resource_provider(self):
|
@mock.patch('cyborg.common.placement_client.PlacementClient.delete')
|
||||||
|
def test_delete_resource_provider(self, mock_delete):
|
||||||
rp_uuid = uuidutils.generate_uuid()
|
rp_uuid = uuidutils.generate_uuid()
|
||||||
self.client.delete_resource_provider(rp_uuid)
|
self.client.delete_provider(rp_uuid)
|
||||||
e_filter = {'region_name': mock.ANY, 'service_type': 'placement'}
|
expected_url = '/resource_providers/' + rp_uuid
|
||||||
expected_url = '/resource_providers/%s' % rp_uuid
|
mock_delete.assert_called_once_with(
|
||||||
self.mock_request.assert_called_once_with(expected_url, 'DELETE',
|
expected_url, global_request_id=mock.ANY)
|
||||||
endpoint_filter=e_filter)
|
|
||||||
|
|
||||||
def test_create_inventory(self):
|
def test_create_inventory(self):
|
||||||
expected_payload = 'fake_inventory'
|
expected_payload = 'fake_inventory'
|
||||||
|
Loading…
Reference in New Issue
Block a user