X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Ftest_motion.py;fp=tests%2Ftest_motion.py;h=c1f996c3312966439f5bb4a5572cd5637372d350;hb=a53a0a3e8ad96f0805c05a45a06e15352dd45f72;hp=bb4acf01ffab6970583e37101fecd655cd77c682;hpb=e459f85797c9ace2a9367294a5be7435533d3d37;p=motion.git diff --git a/tests/test_motion.py b/tests/test_motion.py index bb4acf0..c1f996c 100644 --- a/tests/test_motion.py +++ b/tests/test_motion.py @@ -85,7 +85,9 @@ class GeneralTests(BasicTest): result = self.app.get('/', environ_base={'USER_ROLES': user}, follow_redirects=True) testtext= '
\n
'\ + '\n Motion C (Canceled)\n group1'\ - + '\n
# g1.20200402.003
'\ + + '\n
# g1.20200402.003'\ + + '\n Result'\ + + '\n
'\ + '\n
\n
Proposed: 2020-04-02 21:47:24 (UTC) by User A
'\ + '\n
Canceled: 2020-04-03 21:48:24 (UTC) by User A
\n
'\ + '\n
\n

A third motion

'\ @@ -96,7 +98,9 @@ class GeneralTests(BasicTest): self.assertIn(str.encode(testtext), result.data) testtext= '
\n
'\ + '\n Motion B (Finished)\n group1'\ - + '\n
# g1.20200402.002
'\ + + '\n
# g1.20200402.002'\ + + '\n Result'\ + + '\n
'\ + '\n
\n
Proposed: 2020-04-02 21:41:26 (UTC) by User A
'\ + '\n
Votes until: 2020-04-04 21:41:26 (UTC)
\n
'\ + '\n
\n

A second motion

'\ @@ -106,7 +110,9 @@ class GeneralTests(BasicTest): self.assertIn(str.encode(testtext), result.data) testtext= '
\n
'\ + '\n Motion A (Finished)\n group1'\ - + '\n '\ + + '\n
# g1.20200402.001'\ + + '\n Result'\ + + '\n
'\ + '\n
\n
Proposed: 2020-04-02 21:40:33 (UTC) by User A
'\ + '\n
Votes until: 2020-04-02 21:40:33 (UTC)
\n
'\ + '\n
\n

My special motion

'\ @@ -333,6 +339,8 @@ class CreateMotionTests(BasicTest): self.assertIn(str.encode(title), result.data) self.assertIn(str.encode(content), result.data) self.assertIn(str.encode('g1.'+datetime.today().strftime('%Y%m%d')+'.001'), result.data) + testtext='Vote' + self.assertIn(str.encode(testtext), result.data) title='My Motion1' content='My body1'