X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Ftest_motion.py;h=1bc65858461318e377cf8660479502895cf80cff;hb=66a7e727089249cd3eeea99c2aead5fb6a9550ce;hp=bb4acf01ffab6970583e37101fecd655cd77c682;hpb=e459f85797c9ace2a9367294a5be7435533d3d37;p=motion.git diff --git a/tests/test_motion.py b/tests/test_motion.py index bb4acf0..1bc6585 100644 --- a/tests/test_motion.py +++ b/tests/test_motion.py @@ -48,6 +48,12 @@ class BasicTest(TestCase): data=dict(reason=reason) ) + def finishMotion(self, user, motion): + return self.app.post( + '/motion/' + motion +'/finish', + environ_base={'USER_ROLES': user} + ) + def buildResultText(self, motiontext, yes, no, abstain): return '
'+motiontext+'
\n\nYes '+str(yes)+'
'\
+ '\nNo '+str(no)+'
'\
@@ -85,7 +91,9 @@ class GeneralTests(BasicTest):
result = self.app.get('/', environ_base={'USER_ROLES': user}, follow_redirects=True)
testtext= '
A third motion
'\ @@ -96,7 +104,9 @@ class GeneralTests(BasicTest): self.assertIn(str.encode(testtext), result.data) testtext= 'A second motion
'\ @@ -106,7 +116,9 @@ class GeneralTests(BasicTest): self.assertIn(str.encode(testtext), result.data) testtext= 'My special motion
'\ @@ -127,7 +139,7 @@ class GeneralTests(BasicTest): def test_basic_results_data_details(self): motion='g1.20200402.002' result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': user}, follow_redirects=True) - testtext= 'A second motion
\n