def test_get_devices_preexisting_devices(self, inventory): output = get_devices(inventory, search_container=SEARCH_CONTAINER, devices=[], device_filter=[GET_DEVICE_FILTER]) assert [GET_DEVICE_FILTER in item for item in output]
def test_get_devices_preexisting_devices(self, inventory): devices = ["TEST_DEVICE"] output = get_devices(inventory, search_container=SEARCH_CONTAINER, devices=devices) assert output == ["TEST_DEVICE"] + GET_DEVICES
def test_get_devices_default_search_container(self, inventory): output = get_devices(inventory) assert output is None
def test_get_devices_non_default_search_container(self, inventory): output = get_devices(inventory, search_container=SEARCH_CONTAINER, devices=[]) assert output == GET_DEVICES
def test_get_devices_empty_inventory(self): output = get_devices(None) assert output is None