コード例 #1
0
 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]
コード例 #2
0
 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
コード例 #3
0
 def test_get_devices_default_search_container(self, inventory):
     output = get_devices(inventory)
     assert output is None
コード例 #4
0
 def test_get_devices_non_default_search_container(self, inventory):
     output = get_devices(inventory,
                          search_container=SEARCH_CONTAINER,
                          devices=[])
     assert output == GET_DEVICES
コード例 #5
0
 def test_get_devices_empty_inventory(self):
     output = get_devices(None)
     assert output is None