def test_list_version_headers_empty(mock_service): service, _ = mock_service("container_get.json", "empty.json") container = GTMContainer(path="accounts/1234/containers/1234", service=service) container_list = container.list_version_headers() assert container_list == [] container.list_version_headers(refresh=False)
def test_list_version_headers(mock_service): service, responses = mock_service("container_get.json", "version_headers_list.json") version_headers_dict = responses[1] container = GTMContainer(path="accounts/1234/containers/1234", service=service) container_list = container.list_version_headers() assert len(container_list) == len( version_headers_dict["containerVersionHeader"]) assert isinstance(container_list[0], GTMVersionHeader) container.list_version_headers(refresh=False)