Browse Source

check if the group exists

master
Julio Biason 10 years ago
parent
commit
ac4bbec335
  1. 8
      tests/vote_tests.py

8
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__':

Loading…
Cancel
Save