def test_list_anonymously_has_no_key(self, requests_mock: "Mocker_Type", root_url: str) -> None: url = urljoin(root_url, 'collections') # Don't really care about the response here, since we're just interested in the request # parameters. We test that this gives a valid response in a different test requests_mock.get(url, json={"collections": []}) _ = Collection.list(profile="__anonymous__") history = requests_mock.request_history actual_url = history[0].url qs = parse_qs(urlsplit(actual_url).query) assert "key" not in qs
def test_list_collections(self, collections): collections = Collection.list() assert len(collections) == 47 assert isinstance(collections[0], Collection)
def test_list_collections(self) -> None: collections = Collection.list() assert isinstance(collections, list) assert isinstance(collections[0], Collection)