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/05/27 13:58:22 UTC
[50/50] [abbrv] allura git commit: [#7868] ticket:777 Fix tests
[#7868] ticket:777 Fix tests
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/0b5f9394
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/0b5f9394
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/0b5f9394
Branch: refs/heads/ib/7868
Commit: 0b5f9394c1c529affc4230ef6a187598682667c3
Parents: 7791b87
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed May 27 11:00:14 2015 +0000
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Wed May 27 11:00:14 2015 +0000
----------------------------------------------------------------------
.../tests/functional/test_neighborhood.py | 23 +++++---------------
1 file changed, 6 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/0b5f9394/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 259e138..dde6647 100644
--- a/Allura/allura/tests/functional/test_neighborhood.py
+++ b/Allura/allura/tests/functional/test_neighborhood.py
@@ -960,20 +960,6 @@ class TestNeighborhood(TestController):
class TestPhoneVerificationOnProjectRegistration(TestController):
- def test_add_project_shows_phone_verification_overlay(self):
- 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', **params)
- overlay = r.html.find('div', {'id': 'phone_verification_overlay'})
- assert_not_equal(overlay, None)
- header = overlay.find('h2')
- iframe = overlay.find('iframe')
- assert_equal(header.getText(), 'Phone Verification Required')
- assert_equal(iframe.get('src'), '/p/phone_verification_fragment')
-
def test_phone_verification_fragment_renders(self):
self.app.get('/p/phone_verification_fragment', status=200)
self.app.get('/adobe/phone_verification_fragment', status=200)
@@ -1059,6 +1045,9 @@ class TestPhoneVerificationOnProjectRegistration(TestController):
neighborhood='Projects'),
extra_environ=dict(username='test-user'),
antispam=True)
- wf = json.loads(self.webflash(r))
- assert_equal(wf['status'], 'error')
- assert_equal(wf['message'], 'You must pass phone verification')
+ overlay = r.html.find('div', {'id': 'phone_verification_overlay'})
+ assert_not_equal(overlay, None)
+ header = overlay.find('h2')
+ iframe = overlay.find('iframe')
+ assert_equal(header.getText(), 'Phone Verification Required')
+ assert_equal(iframe.get('src'), '/p/phone_verification_fragment')