You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/06/05 20:41:36 UTC
[21/50] [abbrv] allura git commit: [#7868] ticket:776 Fix tests
[#7868] ticket:776 Fix tests
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/9b9b0e8f
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/9b9b0e8f
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/9b9b0e8f
Branch: refs/heads/hs/7873
Commit: 9b9b0e8fd48f3545048e075049e90beac562def9
Parents: 52aaea9
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue May 26 14:21:21 2015 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu May 28 20:11:47 2015 +0000
----------------------------------------------------------------------
Allura/allura/tests/functional/test_neighborhood.py | 6 ++++--
Allura/allura/tests/test_plugin.py | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/9b9b0e8f/Allura/allura/tests/functional/test_neighborhood.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_neighborhood.py b/Allura/allura/tests/functional/test_neighborhood.py
index a2496a4..259e138 100644
--- a/Allura/allura/tests/functional/test_neighborhood.py
+++ b/Allura/allura/tests/functional/test_neighborhood.py
@@ -961,11 +961,12 @@ class TestNeighborhood(TestController):
class TestPhoneVerificationOnProjectRegistration(TestController):
def test_add_project_shows_phone_verification_overlay(self):
- r = self.app.get('/p/add_project')
+ params = {'extra_environ': {'username': 'test-user'}}
+ r = self.app.get('/p/add_project', **params)
overlay = r.html.find('div', {'id': 'phone_verification_overlay'})
assert_equal(overlay, None)
with h.push_config(config, **{'project.verify_phone': 'true'}):
- r = self.app.get('/p/add_project')
+ r = self.app.get('/p/add_project', **params)
overlay = r.html.find('div', {'id': 'phone_verification_overlay'})
assert_not_equal(overlay, None)
header = overlay.find('h2')
@@ -1056,6 +1057,7 @@ class TestPhoneVerificationOnProjectRegistration(TestController):
project_name='Phone Test',
project_description='',
neighborhood='Projects'),
+ extra_environ=dict(username='test-user'),
antispam=True)
wf = json.loads(self.webflash(r))
assert_equal(wf['status'], 'error')
http://git-wip-us.apache.org/repos/asf/allura/blob/9b9b0e8f/Allura/allura/tests/test_plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_plugin.py b/Allura/allura/tests/test_plugin.py
index 74859cc..236e7be 100644
--- a/Allura/allura/tests/test_plugin.py
+++ b/Allura/allura/tests/test_plugin.py
@@ -179,7 +179,7 @@ class TestProjectRegistrationProviderPhoneVerification(object):
self.user.get_tool_data('phone_verification', 'number_hash'),
None)
audit.assert_called_once_with(
- 'Phone verification failed', user=self.user)
+ 'Phone verification failed. Hash: hash', user=self.user)
@patch.object(plugin.h, 'auditlog_user', autospec=True)
@patch.object(plugin, 'g')
@@ -195,7 +195,7 @@ class TestProjectRegistrationProviderPhoneVerification(object):
self.user.get_tool_data('phone_verification', 'number_hash'),
'hash')
audit.assert_called_once_with(
- 'Phone verification succeeded', user=self.user)
+ 'Phone verification succeeded. Hash: hash', user=self.user)
class TestThemeProvider(object):