diff options
| author | Tulio Casagrande <tcasagra@thoughtworks.com> | 2017-02-13 18:43:15 -0200 | 
|---|---|---|
| committer | Anike Arni <aarni@thoughtworks.com> | 2017-02-16 17:01:59 -0200 | 
| commit | 0b966e696c6a99f825510d406008fc9b9936077e (patch) | |
| tree | c91a78cddaeb82de7383380e75196f8993fcb175 /service/test/unit/resources/test_login_resource.py | |
| parent | 48a1ca5f8310ef6fb61dc821c38d435617b19d5c (diff) | |
[#907] Convert login page to react
with @anikarni
Diffstat (limited to 'service/test/unit/resources/test_login_resource.py')
| -rw-r--r-- | service/test/unit/resources/test_login_resource.py | 18 | 
1 files changed, 5 insertions, 13 deletions
| diff --git a/service/test/unit/resources/test_login_resource.py b/service/test/unit/resources/test_login_resource.py index 834b9710..eeb7349a 100644 --- a/service/test/unit/resources/test_login_resource.py +++ b/service/test/unit/resources/test_login_resource.py @@ -87,23 +87,15 @@ class TestLoginResource(unittest.TestCase):          d = self.web.get(request) -        def assert_form_rendered(_): +        def assert_login_page_rendered(_):              self.assertEqual(200, request.responseCode) -            form_action = 'action="/login"' -            form_method = 'method="post"' -            input_username = 'name="username"' -            input_password = 'name="password"' -            input_submit = 'name="login"' +            title = 'Pixelated - Login'              default_disclaimer = 'Some disclaimer'              written_response = ''.join(request.written) -            self.assertIn(form_action, written_response) -            self.assertIn(form_method, written_response) -            self.assertIn(input_password, written_response) -            self.assertIn(input_submit, written_response) -            self.assertIn(input_username, written_response) +            self.assertIn(title, written_response)              self.assertIn(default_disclaimer, written_response) -        d.addCallback(assert_form_rendered) +        d.addCallback(assert_login_page_rendered)          return d      def _write(self, filename, content): @@ -238,7 +230,7 @@ class TestLoginPOST(unittest.TestCase):          def assert_interstitial_in_response(_):              mock_authenticate.assert_called_once_with(self.username, self.password) -            interstitial_js_in_template = '<script src="startup-assets/Interstitial.js"></script>' +            interstitial_js_in_template = '<script src="/assets/interstitial.js"></script>'              self.assertIn(interstitial_js_in_template, self.request.written[0])          d.addCallback(assert_interstitial_in_response) | 
