Skip to content

Commit

Permalink
Merge 6ae80d3 into b9519ac
Browse files Browse the repository at this point in the history
  • Loading branch information
callenmacphee committed Aug 15, 2019
2 parents b9519ac + 6ae80d3 commit a0fdcc3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,26 @@ def test_index_list_with_params_negate(client, user):
assert rec_5["did"] in ids


def test_index_list_limit_error(client, user):
data = get_doc()
res = client.post("/index/", json=data, headers=user)
assert res.status_code == 200

# test 400 when limit > 1024
res = client.get("/index/?limit=1025")
assert res.status_code == 400


def test_index_list_size_error(client, user):
data = get_doc()
res = client.post("/index/", json=data, headers=user)
assert res.status_code == 200

# test 400 when size < 0
res = client.get("/index/?size=-1")
assert res.status_code == 400


def test_negate_filter_file_name(client, user):
# post two records of different file name
data1 = get_doc()
Expand Down

0 comments on commit a0fdcc3

Please sign in to comment.