allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [50/50] [abbrv] allura git commit: [#7868] ticket:777 Fix tests
Date Wed, 27 May 2015 11:58:22 GMT
[#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 <jetmind2@gmail.com>
Authored: Wed May 27 11:00:14 2015 +0000
Committer: Igor Bondarenko <jetmind2@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')


Mime
View raw message