diff --git a/tests/test_pagure_flask_ui_app.py b/tests/test_pagure_flask_ui_app.py index c346bae..3c8eaa1 100644 --- a/tests/test_pagure_flask_ui_app.py +++ b/tests/test_pagure_flask_ui_app.py @@ -647,8 +647,7 @@ class PagureFlaskApptests(tests.Modeltests): '', output_text) - csrf_token = output_text.split( - 'name="csrf_token" type="hidden" value="')[1].split('">')[0] + csrf_token = self.get_csrf(output=output) data = { 'ssh_key': 'blah' @@ -820,8 +819,7 @@ class PagureFlaskApptests(tests.Modeltests): '', output_text) - csrf_token = output_text.split( - 'name="csrf_token" type="hidden" value="')[1].split('">')[0] + csrf_token = self.get_csrf(output=output) # With CSRF data['csrf_token'] = csrf_token @@ -886,8 +884,7 @@ class PagureFlaskApptests(tests.Modeltests): '
\n Basic Information\n' '
', output_text) - csrf_token = output_text.split( - 'name="csrf_token" type="hidden" value="')[1].split('">')[0] + csrf_token = self.get_csrf(output=output) tests.create_projects(self.session) tests.create_projects_git(os.path.join(self.path, 'repos'), bare=True) @@ -916,8 +913,7 @@ class PagureFlaskApptests(tests.Modeltests): '
\n Basic Information\n' '
', output_text) - csrf_token = output_text.split( - 'name="csrf_token" type="hidden" value="')[1].split('">')[0] + csrf_token = self.get_csrf(output=output) tests.create_projects(self.session) tests.create_projects_git(os.path.join(self.path, 'repos'), bare=True) @@ -970,8 +966,7 @@ class PagureFlaskApptests(tests.Modeltests): '', output_text) - csrf_token = output_text.split( - 'name="csrf_token" type="hidden" value="')[1].split('">')[0] + csrf_token = self.get_csrf(output=output) data = { 'email': 'foo@pingou.com', @@ -1015,8 +1010,7 @@ class PagureFlaskApptests(tests.Modeltests): '', output_text) - csrf_token = output_text.split( - 'name="csrf_token" type="hidden" value="')[1].split('">')[0] + csrf_token = self.get_csrf(output=output) data = { 'email': 'foo@pingou.com', @@ -1236,8 +1230,7 @@ class PagureFlaskApptests(tests.Modeltests): '', output_text) - csrf_token = output_text.split( - 'name="csrf_token" type="hidden" value="')[1].split('">')[0] + csrf_token = self.get_csrf(output=output) data = { 'email': 'foo@pingou.com', @@ -1337,8 +1330,7 @@ class PagureFlaskApptests(tests.Modeltests): '', output_text) - csrf_token = output_text.split( - 'name="csrf_token" type="hidden" value="')[1].split('">')[0] + csrf_token = self.get_csrf(output=output) data = { 'email': 'foo@pingou.com',