@pytest.mark.parametrize('name,version', ALL_APIS)
def test_getattr(open_discovery_document, name, version):
    discovery_document = open_discovery_document(name, version)
    api = GoogleAPI(discovery_document=discovery_document)
    for (resource_name, _) in discovery_document.get('resources').items():
        resource_object = getattr(api, resource_name)
        assert isinstance(resource_object, Resource)
        assert (resource_name == resource_object.name)
@pytest.mark.parametrize('name,version', ALL_APIS)
def test_getattr(open_discovery_document, name, version):
    discovery_document = open_discovery_document(name, version)
    api = GoogleAPI(discovery_document=discovery_document)
    for (resource_name, _) in discovery_document.get('resources').items():
        resource_object = getattr(api, resource_name)
        assert isinstance(resource_object, Resource)
        assert (resource_name == resource_object.name)