allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [02/10] allura git commit: [#8253] Chunk assertions to lines
Date Thu, 08 Nov 2018 21:53:43 GMT
[#8253] Chunk assertions to lines


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/2593a22b
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/2593a22b
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/2593a22b

Branch: refs/heads/master
Commit: 2593a22b6f0e0e38aba53dd36cd5a09e87e812d0
Parents: c54ede3
Author: Shalitha Suranga <shalithasuranga@gmail.com>
Authored: Mon Nov 5 13:37:54 2018 +0530
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Nov 8 21:53:25 2018 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_discuss.py | 33 +++++++++++++--------
 1 file changed, 20 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/2593a22b/Allura/allura/tests/functional/test_discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_discuss.py b/Allura/allura/tests/functional/test_discuss.py
index 15ef794..fbe631b 100644
--- a/Allura/allura/tests/functional/test_discuss.py
+++ b/Allura/allura/tests/functional/test_discuss.py
@@ -225,14 +225,16 @@ class TestDiscuss(TestDiscussBase):
             react_link,
             params={
                 'r': ':+1:'})
-        assert response.json['status'] == 'ok' and response.json['counts'][':+1:'] == 1 and
\
-        response.json['emoji_unicode'][':+1:'] == u'\U0001F44D'
+        assert response.json['status'] == 'ok'
+        assert response.json['counts'][':+1:'] == 1
+        assert response.json['emoji_unicode'][':+1:'] == u'\U0001F44D'
         response = self.app.post(
             react_link,
             params={
                 'r': 'invalid'})
-        assert response.json['status'] == 'error' and response.json['counts'][':+1:'] ==
1 and \
-        response.json['emoji_unicode'][':+1:'] == u'\U0001F44D'
+        assert response.json['status'] == 'error' 
+        assert response.json['counts'][':+1:'] == 1
+        assert response.json['emoji_unicode'][':+1:'] == u'\U0001F44D'
         # anon users can't react comments
         response = self.app.post(
             react_link,
@@ -257,15 +259,18 @@ class TestDiscuss(TestDiscussBase):
             react_link,
             params={
                 'r': ':-1:'})
-        assert response.json['status'] == 'ok' and response.json['counts'][':-1:'] == 1 and
\
-        response.json['emoji_unicode'][':-1:'] == u'\U0001F44E'
+        assert response.json['status'] == 'ok'
+        assert response.json['counts'][':-1:'] == 1
+        assert response.json['emoji_unicode'][':-1:'] == u'\U0001F44E'
         response = self.app.post(
             react_link,
             params={
                 'r': ':+1:'})
-        assert response.json['status'] == 'ok' and response.json['counts'][':+1:'] == 1 and
\
-        ':-1:' not in response.json['counts'] and ':-1:' not in response.json['emoji_unicode']
and \
-        response.json['emoji_unicode'][':+1:'] == u'\U0001F44D'
+        assert response.json['status'] == 'ok'
+        assert response.json['counts'][':+1:'] == 1
+        assert ':-1:' not in response.json['counts']
+        assert ':-1:' not in response.json['emoji_unicode']
+        assert response.json['emoji_unicode'][':+1:'] == u'\U0001F44D'
 
     def test_comment_post_reaction_undo(self):
         r = self._make_post('This is a post')
@@ -276,14 +281,16 @@ class TestDiscuss(TestDiscussBase):
             react_link,
             params={
                 'r': ':tada:'})
-        assert response.json['status'] == 'ok' and response.json['counts'][':tada:'] == 1
and \
-        response.json['emoji_unicode'][':tada:'] == u'\U0001F389'
+        assert response.json['status'] == 'ok'
+        assert response.json['counts'][':tada:'] == 1
+        assert response.json['emoji_unicode'][':tada:'] == u'\U0001F389'
         response = self.app.post(
             react_link,
             params={
                 'r': ':tada:'})
-        assert response.json['status'] == 'ok' and ':tada:' not in response.json['counts']
and \
-        ':tada:' not in response.json['emoji_unicode']
+        assert response.json['status'] == 'ok'
+        assert ':tada:' not in response.json['counts']
+        assert ':tada:' not in response.json['emoji_unicode']
 
     def test_user_filter(self):
         r = self._make_post('Test post')


Mime
View raw message