Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(leftovers): add tests to hit uncovered code #235

Merged
merged 13 commits into from
Aug 14, 2019
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions indexd/index/drivers/query/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def query_urls(
Returns:
list: result list
"""
pass
raise NotImplementedError("TODO")

@abstractmethod
def query_metadata_by_key(
Expand All @@ -55,4 +55,4 @@ def query_metadata_by_key(
Returns:
list: result list
"""
pass
raise NotImplementedError("TODO")
7 changes: 7 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,13 @@ def test_get_urls(client, user):
assert record["urls"][0]["url"] == url
assert record["urls"][0]["metadata"] == data["urls_metadata"][url]

response = client.get("/urls/?size={}".format(data["size"]))
assert response.status_code == 200
record = response.json
url = data["urls"][0]
assert record["urls"][0]["url"] == url
assert record["urls"][0]["metadata"] == data["urls_metadata"][url]


def test_index_create(client, user):
data = get_doc(has_baseid=True)
Expand Down
Loading