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 2014/09/17 15:34:07 UTC

[20/35] git commit: [#7657] ticket:651 Fix tests failures

[#7657] ticket:651 Fix tests failures


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

Branch: refs/heads/je/42cc_7657
Commit: 84658f1b4c0e9edfcb3b426add94b627de56c2b4
Parents: b82cd93
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Sep 16 11:50:51 2014 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Wed Sep 17 16:11:37 2014 +0300

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_site_admin.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/84658f1b/Allura/allura/tests/functional/test_site_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_site_admin.py b/Allura/allura/tests/functional/test_site_admin.py
index 6c418d6..101a41e 100644
--- a/Allura/allura/tests/functional/test_site_admin.py
+++ b/Allura/allura/tests/functional/test_site_admin.py
@@ -255,8 +255,9 @@ class TestUserDetails(TestController):
         assert_in('Adobe project 1', projects)
 
     @patch('allura.model.auth.request')
-    def test_audit_log(self, request):
-        request.url = 'http://host.domain/path/'
+    @patch('allura.lib.helpers.request')
+    def test_audit_log(self, req1, req2):
+        req1.url = req2.url = 'http://host.domain/path/'
         c.user = M.User.by_username('test-user-1')
         h.auditlog_user('test activity user 1')
         h.auditlog_user('test activity user 2', user=M.User.by_username('test-user-2'))
@@ -280,7 +281,7 @@ class TestUserDetails(TestController):
     def test_add_comment(self):
         r = self.app.get('/nf/admin/user/test-user')
         assert_not_in(u'Comment by test-admin: I was hêre!', r)
-        form = r.forms[0]
+        form = r.forms[1]
         assert_equal(form['username'].value, 'test-user')
         form['comment'] = u'I was hêre!'
         r = form.submit()