def test_get_host_list(self, sdk_client_fs: ADCMClient, provider: Provider): """ Create multiple hosts and check that all hosts was created """ actual, expected = [], [] for fqdn in utils.random_string_list(): provider.host_create(fqdn) expected.append(fqdn) for host in sdk_client_fs.host_list(): actual.append(host.fqdn) with allure.step("Check created hosts with the data from the API"): assert all(expected_host in actual for expected_host in expected)
def test_get_host_list(self, sdk_client_fs: ADCMClient): """Create multiple hosts and check that all hosts was created """ expected_list = set() actual_list = set() bundle = sdk_client_fs.upload_from_fs(get_data_dir(__file__, 'hostprovider_simple')) hp = bundle.provider_create(utils.random_string()) for fqdn in utils.random_string_list(): hp.host_create(fqdn) expected_list.add(fqdn) for host in sdk_client_fs.host_list(): actual_list.add(host.fqdn) with allure.step('Check created hosts with the data from the API'): assert actual_list == expected_list