X-Git-Url: https://code.wpia.club/?p=motion.git;a=blobdiff_plain;f=tests%2Ftest_motion.py;h=b6622a2c006cf6aca5d7b7401568499b3abb9439;hp=1577f3e2495623ce8f5f7bb06b90ee0e46bf3953;hb=de04e2bd443678277e50de3cda5f0cdc4ff5451c;hpb=0e21faff8279cf573c0483ff3be5092beef0e8e9 diff --git a/tests/test_motion.py b/tests/test_motion.py index 1577f3e..b6622a2 100644 --- a/tests/test_motion.py +++ b/tests/test_motion.py @@ -276,14 +276,14 @@ class VoterTests(BasicTest): def test_vote_closed(self): motion='g1.20200402.002' response = self.createVote(user, motion, 'abstain') - self.assertEqual(response.status_code, 500) - self.assertIn(str.encode('Error, motion deadline has passed'), response.data) + self.assertEqual(response.status_code, 403) + self.assertIn(str.encode('Error, out of time'), response.data) def test_vote_canceled(self): motion='g1.20200402.003' response = self.createVote(user, motion, 'abstain') - self.assertEqual(response.status_code, 500) - self.assertIn(str.encode('Error, motion deadline has passed'), response.data) + self.assertEqual(response.status_code, 403) + self.assertIn(str.encode('Error, motion was canceled'), response.data) def test_vote_not_given(self): motion='g1.30190402.001' @@ -461,7 +461,7 @@ class CreateMotionTests(BasicTest): motion='g1.20200402.004' response = self.cancelMotion(user, motion, reason) self.assertEqual(response.status_code, 403) - self.assertIn(str.encode('Error, out of time'), response.data) + self.assertIn(str.encode('Error, motion was canceled'), response.data) def test_finishMotion(self): self.db_sampledata()