allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [13/16] allura git commit: [#1731] ticket:767 Fix tests
Date Mon, 25 May 2015 15:49:43 GMT
[#1731] ticket:767 Fix tests


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

Branch: refs/heads/ib/1731
Commit: e51d62958c2c61f9fc9ca247fd2eb971b9272d65
Parents: da4094d
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon May 18 16:38:25 2015 +0000
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Mon May 25 13:31:53 2015 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_discuss.py                    | 3 ++-
 .../unit/controllers/test_discussion_moderation_controller.py     | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/e51d6295/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 31e454e..cd30f44 100644
--- a/Allura/allura/tests/functional/test_discuss.py
+++ b/Allura/allura/tests/functional/test_discuss.py
@@ -171,7 +171,8 @@ class TestDiscuss(TestController):
         post = M.Post.query.find().first()
         assert post.status == 'ok'
         self.app.post(post_link + 'moderate', params=dict(delete='delete'))
-        assert M.Post.query.find().count() == 0
+        assert M.Post.query.find().count() == 1
+        assert M.Post.query.find({'deleted': False}).count() == 0
 
     @patch.object(M.Thread, 'is_spam')
     def test_feed_does_not_include_comments_held_for_moderation(self, is_spam):

http://git-wip-us.apache.org/repos/asf/allura/blob/e51d6295/Allura/allura/tests/unit/controllers/test_discussion_moderation_controller.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/unit/controllers/test_discussion_moderation_controller.py
b/Allura/allura/tests/unit/controllers/test_discussion_moderation_controller.py
index e6dc38d..e604222 100644
--- a/Allura/allura/tests/unit/controllers/test_discussion_moderation_controller.py
+++ b/Allura/allura/tests/unit/controllers/test_discussion_moderation_controller.py
@@ -68,7 +68,7 @@ class TestWhenModerating(WithDatabase):
         ThreadLocalORMSession.flush_all()
 
     def get_post(self):
-        return model.Post.query.get(slug='mypost')
+        return model.Post.query.get(slug='mypost', deleted=False)
 
 
 class TestIndexWithNoPosts(WithDatabase):


Mime
View raw message