From c3b75f5636e39a5e1b7e0887a4298ebcac15786c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 05 2016 21:19:40 +0000 Subject: Adjust unit-tests for the change in indentation in the HTML --- diff --git a/tests/test_pagure_flask_ui_app.py b/tests/test_pagure_flask_ui_app.py index fcd5ded..c15c844 100644 --- a/tests/test_pagure_flask_ui_app.py +++ b/tests/test_pagure_flask_ui_app.py @@ -161,23 +161,24 @@ class PagureFlaskApptests(tests.Modeltests): self.assertEqual(output.status_code, 200) self.assertIn('Create new Project', output.data) self.assertIn( - '\n This field is required.' - ' \n ', output.data) + '\n This field is required. \n' + ' ', output.data) data['name'] = 'project-1' output = self.app.post('/new/', data=data) self.assertEqual(output.status_code, 200) self.assertIn('Create new Project', output.data) self.assertNotIn( - '\n This field is required.' - ' \n ', output.data) + '\n This field is required. \n' + ' ', output.data) data['csrf_token'] = csrf_token output = self.app.post('/new/', data=data) self.assertEqual(output.status_code, 200) self.assertIn('Create new Project', output.data) self.assertIn( - '\n No user "username" found', + '\n No user ' + '"username" found\n ', output.data) user.username = 'foo' diff --git a/tests/test_pagure_flask_ui_issues.py b/tests/test_pagure_flask_ui_issues.py index e093181..fab24c2 100644 --- a/tests/test_pagure_flask_ui_issues.py +++ b/tests/test_pagure_flask_ui_issues.py @@ -1163,11 +1163,11 @@ class PagureFlaskIssuestests(tests.Modeltests): '
\n Edit ' 'issue #1\n
' in output.data) self.assertEqual(output.data.count( - '\n This field is required' - '. \n '), 1) + '\n This field is required. \n' + ' '), 1) self.assertEqual(output.data.count( - '\n Not a valid choice' - ' \n '), 1) + '\n Not a valid choice ' + '\n '), 1) data['status'] = 'Open' data['title'] = 'Test issue #1' @@ -1177,11 +1177,11 @@ class PagureFlaskIssuestests(tests.Modeltests): '
\n Edit ' 'issue #1\n
' in output.data) self.assertEqual(output.data.count( - '\n This field is required' - '. \n '), 0) + '\n This field is required. \n' + ' '), 0) self.assertEqual(output.data.count( - '\n Not a valid choice' - '. \n '), 0) + '\n Not a valid choice ' + '\n '), 0) data['csrf_token'] = csrf_token output = self.app.post(