allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [15/50] git commit: [#6446] ticket:400 fixed test for showing only ok posts
Date Thu, 08 Aug 2013 13:34:34 GMT
[#6446] ticket:400 fixed test for showing only ok posts


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

Branch: refs/heads/tv/6458
Commit: 24cd410cfe4d9a89541faa1ed4c6204b394cc081
Parents: 58a2727
Author: Anton Kasyanov <mind1master@gmail.com>
Authored: Mon Jul 22 16:31:34 2013 +0300
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Wed Jul 31 14:55:48 2013 +0000

----------------------------------------------------------------------
 .../forgediscussion/tests/functional/test_rest.py           | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/24cd410c/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py b/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py
index 3aca6e0..6c45a2a 100644
--- a/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py
+++ b/ForgeDiscussion/forgediscussion/tests/functional/test_rest.py
@@ -24,6 +24,7 @@ from allura.tests import decorators as td
 from allura import model as M
 from alluratest.controller import TestRestApiBase
 from forgediscussion.model import ForumThread
+from ming.orm import ThreadLocalORMSession
 
 
 class TestDiscussionApiBase(TestRestApiBase):
@@ -186,9 +187,6 @@ class TestRootRestController(TestDiscussionApiBase):
         assert_equal(resp.json['limit'], 1)
 
     def test_topic_show_ok_only(self):
-        # import logging
-        # log = logging.getLogger(__name__)
-
         thread = ForumThread.query.find({'subject': 'Hi guys'}).first()        
         url = '/rest/p/test/discussion/general/thread/%s/' % thread._id
         resp = self.app.get(url)
@@ -198,12 +196,9 @@ class TestRootRestController(TestDiscussionApiBase):
         last_post = thread.last_post
         last_post.status = 'pending'
         last_post.commit()
-
+        ThreadLocalORMSession.flush_all()
         resp = self.app.get(url)
         posts = resp.json['topic']['posts']        
-
-        # log.info('ready to debug')
-        # log.info(posts)
         assert_equal(len(posts), 1)
 
     def test_security(self):


Mime
View raw message