def test_create_with_host_network(self, docker_client: DockerClient, create_container): info = create_container("alpine", network="host") network = docker_client.get_network(info.container_name) assert "host" == network
def test_get_network_non_existing_container(self, docker_client: DockerClient): # TODO: define behavior with pytest.raises(ContainerException) as ex: docker_client.get_network("this_container_does_not_exist") assert ex.match("[Nn]o such object")
def test_get_network(self, docker_client: DockerClient, dummy_container): n = docker_client.get_network(dummy_container.container_name) assert "default" == n