X-Git-Url: https://code.wpia.club/?p=motion.git;a=blobdiff_plain;f=tests%2Ftest_motion.py;fp=tests%2Ftest_motion.py;h=0399df04fc955922eae2510351774e556135cfb6;hp=e500639bc3a006d52fec1fbcb001ce3c2dc6b80e;hb=27e9c554929138818e62ae4e624dd3450a84b556;hpb=5997dc772e9a15638398f9fe18521c6b64cdac5e diff --git a/tests/test_motion.py b/tests/test_motion.py index e500639..0399df0 100644 --- a/tests/test_motion.py +++ b/tests/test_motion.py @@ -234,11 +234,11 @@ class VoterTests(BasicTest): result = self.app.get('/', environ_base={'USER_ROLES': user}) resulttext=self.buildResultText('A fourth motion', 1, 0, 0) result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': user}, follow_redirects=True) - testtext= 'class=\"btn btn-success\" name=\"vote\" value="yes" id="vote-yes">yes' + testtext= 'class=\"btn btn-success\" name=\"vote\" value="yes" id="vote-yes">Yes' self.assertIn(str.encode(testtext), result.data) - testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"no\" id=\"vote-no\">no' + testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"no\" id=\"vote-no\">No' self.assertIn(str.encode(testtext), result.data) - testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"abstain\" id=\"vote-abstain\">abstain' + testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"abstain\" id=\"vote-abstain\">Abstain' self.assertIn(str.encode(testtext), result.data) def test_vote_no(self): @@ -249,11 +249,11 @@ class VoterTests(BasicTest): resulttext=self.buildResultText('A fourth motion', 0, 1, 0) self.assertIn(str.encode(resulttext), result.data) result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': user}, follow_redirects=True) - testtext= 'class="btn btn-primary" name="vote\" value=\"yes\" id=\"vote-yes\">yes' + testtext= 'class="btn btn-primary" name="vote\" value=\"yes\" id=\"vote-yes\">Yes' self.assertIn(str.encode(testtext), result.data) - testtext= 'class=\"btn btn-success\" name=\"vote\" value=\"no\" id=\"vote-no\">no' + testtext= 'class=\"btn btn-success\" name=\"vote\" value=\"no\" id=\"vote-no\">No' self.assertIn(str.encode(testtext), result.data) - testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"abstain\" id=\"vote-abstain\">abstain' + testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"abstain\" id=\"vote-abstain\">Abstain' self.assertIn(str.encode(testtext), result.data) def test_vote_abstain(self): @@ -264,11 +264,11 @@ class VoterTests(BasicTest): resulttext=self.buildResultText('A fourth motion', 0, 0, 1) self.assertIn(str.encode(resulttext), result.data) result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': user}, follow_redirects=True) - testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"yes\" id=\"vote-yes\">yes' + testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"yes\" id=\"vote-yes\">Yes' self.assertIn(str.encode(testtext), result.data) - testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"no\" id=\"vote-no\">no' + testtext= 'class=\"btn btn-primary\" name=\"vote\" value=\"no\" id=\"vote-no\">No' self.assertIn(str.encode(testtext), result.data) - testtext= 'class=\"btn btn-success\" name=\"vote\" value=\"abstain\" id=\"vote-abstain\">abstain' + testtext= 'class=\"btn btn-success\" name=\"vote\" value=\"abstain\" id=\"vote-abstain\">Abstain' self.assertIn(str.encode(testtext), result.data) def test_vote_change(self): @@ -793,15 +793,15 @@ class ProxyVoteTests(BasicTest): result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': user}, follow_redirects=True) # own vote without change testtext= '
\n'\ - + '\n'\ - + '\n'\ - + '\n
' + + '\n'\ + + '\n'\ + + '\n' self.assertIn(str.encode(testtext), result.data) # proxy vote with change testtext= '
\n'\ - + '\n'\ - + '\n'\ - + '\n
\n' + + '\n'\ + + '\n'\ + + '\n\n' self.assertIn(str.encode(testtext), result.data) # User B view @@ -809,9 +809,9 @@ class ProxyVoteTests(BasicTest): # own vote without change testtext= '

My vote

\nGiven by testuser\n'\ + '
\n'\ - + '\n'\ - + '\n'\ - + '\n
' + + '\n'\ + + '\n'\ + + '\n' self.assertIn(str.encode(testtext), result.data) # change vote @@ -820,9 +820,9 @@ class ProxyVoteTests(BasicTest): result = self.app.get('/motion/' + motion, environ_base={'USER_ROLES': user}, follow_redirects=True) testtext= '
\n'\ - + '\n'\ - + '\n'\ - + '\n
\n' + + '\n'\ + + '\n'\ + + '\n\n' self.assertIn(str.encode(testtext), result.data) def test_proxy_vote_no_proxy(self):