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:13:26 UTC

[24/26] 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/d9ce2a4d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d9ce2a4d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d9ce2a4d

Branch: refs/heads/master
Commit: d9ce2a4d5acfc5e87480dde8f9852a48d3e4be87
Parents: 07f4f0a
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed May 27 11:00:14 2015 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu May 28 20:11:47 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/d9ce2a4d/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')