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 2015/05/28 22:11:34 UTC
allura git commit: Fix randomly failing tests. rstrip() removes all
chars, only need to remove / and if slug had "reply" chars in it,
it would not be found
Repository: allura
Updated Branches:
refs/heads/master e07794389 -> 9e46b8afc
Fix randomly failing tests. rstrip() removes all chars, only need to remove / and if slug had "reply" chars in it, it would not be found
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/9e46b8af
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/9e46b8af
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/9e46b8af
Branch: refs/heads/master
Commit: 9e46b8afcdef593ba0559ae8cc2c28928ee75e08
Parents: e077943
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu May 28 20:11:01 2015 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu May 28 20:11:01 2015 +0000
----------------------------------------------------------------------
Allura/allura/tests/functional/test_discuss.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/9e46b8af/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 74ca133..0063cb8 100644
--- a/Allura/allura/tests/functional/test_discuss.py
+++ b/Allura/allura/tests/functional/test_discuss.py
@@ -234,7 +234,7 @@ class TestDiscuss(TestController):
r = self._make_post('This is a post')
reply_form = r.html.find(
'div', {'class': 'edit_post_form reply'}).find('form')
- post_link = str(reply_form['action']).rstrip('/reply')
+ post_link = str(reply_form['action']).rstrip('/')
_, slug = post_link.rsplit('/', 1)
r = self.app.get(post_link, status=200)
post = M.Post.query.get(slug=slug)
@@ -320,8 +320,9 @@ class TestAttachment(TestController):
thumblink = alink + '/thumb'
self.app.get(alink, status=200)
self.app.get(thumblink, status=200)
- _, slug = self.post_link.rstrip('/reply').rsplit('/', 1)
+ _, slug = self.post_link.rstrip('/').rsplit('/', 1)
post = M.Post.query.get(slug=slug)
+ assert post, 'Could not find post for {} {}'.format(slug, self.post_link)
post.deleted = True
session(post).flush(post)
self.app.get(alink, status=404)