You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2018/11/08 21:53:43 UTC

[02/10] allura git commit: [#8253] Chunk assertions to lines

[#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 <sh...@gmail.com>
Authored: Mon Nov 5 13:37:54 2018 +0530
Committer: Dave Brondsema <db...@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')