Fix existing and add new inventory tests
We were accidentally passing a tuple to the Inventory object. Because of how we write our tests, we did not catch this. Change-Id: I947c7905c73017cff5860c869347aaaaa7e518d6
This commit is contained in:
parent
031361801d
commit
ced0a45cef
@ -26,6 +26,15 @@ class TestInventory(base.TestCase):
|
|||||||
"""Verify Inventory class creates HostManager."""
|
"""Verify Inventory class creates HostManager."""
|
||||||
session = mock.Mock()
|
session = mock.Mock()
|
||||||
url = 'https://10.1.1.0:8080/'
|
url = 'https://10.1.1.0:8080/'
|
||||||
region_id = 1,
|
region_id = 1
|
||||||
inventory.Inventory(session, url, region_id)
|
inventory.Inventory(session, url, region_id)
|
||||||
mock_hostmanager.assert_called_once_with(region_id, session, url)
|
mock_hostmanager.assert_called_once_with(region_id, session, url)
|
||||||
|
|
||||||
|
@mock.patch('cratonclient.v1.cells.CellManager')
|
||||||
|
def test_inventory_creates_cell_manager(self, cell_manager):
|
||||||
|
"""Verify the Inventory class creates a CellManager."""
|
||||||
|
session = mock.Mock()
|
||||||
|
url = 'https://10.1.1.0:8080/'
|
||||||
|
region_id = 1
|
||||||
|
inventory.Inventory(session, url, region_id)
|
||||||
|
cell_manager.assert_called_once_with(region_id, session, url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user