From ac4bbec335a71fb3eb466edfb6ac130b16b0e82b Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 16 Apr 2014 11:40:53 -0300 Subject: [PATCH] check if the group exists --- tests/vote_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/vote_tests.py b/tests/vote_tests.py index ff9ba4c..932189f 100644 --- a/tests/vote_tests.py +++ b/tests/vote_tests.py @@ -273,6 +273,14 @@ class TestVote(LunchoTests): self.assertTrue('closed' in data) self.assertEquals(len(data['results']), 1) self.assertFalse(data['closed']) # voting shouldn't be closed yet + return + + def test_get_results_unknown_group(self): + """Try to get the results of a group that doesn't exist.""" + rv = self.get('/vote/{group_id}/'.format(group_id=100), + token=self.user.token) + self.assertJsonError(rv, 404, 'Group not found') + return if __name__ == '__main__':