Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA0BD104BE for ; Mon, 12 Aug 2013 16:41:01 +0000 (UTC) Received: (qmail 51566 invoked by uid 500); 12 Aug 2013 16:40:49 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 51425 invoked by uid 500); 12 Aug 2013 16:40:49 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 50884 invoked by uid 99); 12 Aug 2013 16:40:47 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Aug 2013 16:40:47 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6CD708BCADC; Mon, 12 Aug 2013 16:40:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org Date: Mon, 12 Aug 2013 16:40:55 -0000 Message-Id: <8e2d5db52f3a4a899804ad30fdcc9114@git.apache.org> In-Reply-To: <9c559e9207e04ab18111ca1aec19f967@git.apache.org> References: <9c559e9207e04ab18111ca1aec19f967@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/50] git commit: [#6446] ticket:400 fixed test for showing only ok posts [#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/cj/6422 Commit: 24cd410cfe4d9a89541faa1ed4c6204b394cc081 Parents: 58a2727 Author: Anton Kasyanov Authored: Mon Jul 22 16:31:34 2013 +0300 Committer: Tim Van Steenburgh 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):