From 7071d471a5238bfaa9d16dc4bce07447d435af65 Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Fri, 13 Jan 2017 18:07:12 +0100 Subject: [PATCH] Add test for empty block_id parameter for votes API --- tests/web/test_votes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/web/test_votes.py b/tests/web/test_votes.py index 4de50502..0f788fc4 100644 --- a/tests/web/test_votes.py +++ b/tests/web/test_votes.py @@ -48,6 +48,10 @@ def test_get_votes_endpoint_multiple_votes(b, client): @pytest.mark.bdb def test_get_votes_endpoint_returns_empty_list_not_found(client): + res = client.get(VOTES_ENDPOINT + "?block_id=") + assert [] == res.json + assert res.status_code == 200 + res = client.get(VOTES_ENDPOINT + "?block_id=123") assert [] == res.json assert res.status_code == 200