You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/10/19 13:37:29 UTC
[04/50] [abbrv] allura git commit: [#7871] fix test failure (delete
page before deleting its app)
[#7871] fix test failure (delete page before deleting its app)
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/d2ebf892
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d2ebf892
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d2ebf892
Branch: refs/heads/ib/7924
Commit: d2ebf89259f7f1b1a29b670cd09b7002669a21e0
Parents: 4cc456f
Author: Dave Brondsema <da...@brondsema.net>
Authored: Wed Sep 23 17:46:02 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Sep 23 17:46:02 2015 -0400
----------------------------------------------------------------------
Allura/allura/tests/model/test_artifact.py | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/d2ebf892/Allura/allura/tests/model/test_artifact.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_artifact.py b/Allura/allura/tests/model/test_artifact.py
index b6d6832..adbae4e 100644
--- a/Allura/allura/tests/model/test_artifact.py
+++ b/Allura/allura/tests/model/test_artifact.py
@@ -118,29 +118,28 @@ def test_artifact_index():
@with_setup(setUp, tearDown)
def test_artifactlink():
pg = WM.Page(title='TestPage2')
- q = M.Shortlink.query.find(dict(
+ q_shortlink = M.Shortlink.query.find(dict(
project_id=c.project._id,
app_config_id=c.app.config._id,
link=pg.shorthand_id()))
- assert q.count() == 0
+ assert q_shortlink.count() == 0
+
ThreadLocalORMSession.flush_all()
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
- assert q.count() == 1
+ assert q_shortlink.count() == 1
+
assert M.Shortlink.lookup('[TestPage2]')
assert M.Shortlink.lookup('[wiki:TestPage2]')
assert M.Shortlink.lookup('[test:wiki:TestPage2]')
assert not M.Shortlink.lookup('[test:wiki:TestPage2:foo]')
assert not M.Shortlink.lookup('[Wiki:TestPage2]')
assert not M.Shortlink.lookup('[TestPage2_no_such_page]')
+
+ pg.delete()
c.project.uninstall_app('wiki')
- ThreadLocalORMSession.flush_all()
assert not M.Shortlink.lookup('[wiki:TestPage2]')
- pg.delete()
- ThreadLocalORMSession.flush_all()
- M.MonQTask.run_ready()
- ThreadLocalORMSession.flush_all()
- assert q.count() == 0
+ assert q_shortlink.count() == 0
@with_setup(setUp, tearDown)