X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Ftest_motion.py;h=2b95b1e42291438ab506c1a49a16c77236a4faea;hb=b0d66ce5eaacd3eb91b248c7ea7f6b97a90fa65b;hp=b4ba9070980806a21c41f958626e50128c2364fe;hpb=a6ef97b5e46df230af31592497e77435ad2ac1a9;p=motion.git
diff --git a/tests/test_motion.py b/tests/test_motion.py
index b4ba907..2b95b1e 100644
--- a/tests/test_motion.py
+++ b/tests/test_motion.py
@@ -400,6 +400,19 @@ class CreateMotionTests(BasicTest):
self.assertEqual(response.status_code, 403)
self.assertIn(str.encode('Forbidden'), response.data)
+ def test_SeeCancelMotion(self):
+ self.db_sampledata()
+
+ motion='g1.20200402.004'
+ result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': user}, follow_redirects=True)
+ testtext= ''
+ self.assertIn(str.encode(testtext), result.data)
+
+ motion='g1.20200402.004'
+ result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': 'testuser/vote:*'}, follow_redirects=True)
+ testtext= ''
+ self.assertNotIn(str.encode(testtext), result.data)
+
def test_cancelMotion(self):
self.db_sampledata()
@@ -432,6 +445,19 @@ class CreateMotionTests(BasicTest):
self.assertEqual(response.status_code, 403)
self.assertIn(str.encode('Error, motion was canceled'), response.data)
+ def test_SeeFinishMotion(self):
+ self.db_sampledata()
+
+ motion='g1.20200402.004'
+ result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': user}, follow_redirects=True)
+ testtext= ''
+ self.assertIn(str.encode(testtext), result.data)
+
+ motion='g1.20200402.004'
+ result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': 'testuser/vote:*'}, follow_redirects=True)
+ testtext= ''
+ self.assertNotIn(str.encode(testtext), result.data)
+
def test_finishMotion(self):
self.db_sampledata()