From 5e3437d0d410cb09b2edeec54d627a3285916836 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 09 2016 08:18:27 +0000 Subject: Adjust unit-tests for the change in behavior when using an unknown user --- diff --git a/tests/test_pagure_flask_ui_issues.py b/tests/test_pagure_flask_ui_issues.py index 84f96ad..e9d5366 100644 --- a/tests/test_pagure_flask_ui_issues.py +++ b/tests/test_pagure_flask_ui_issues.py @@ -114,15 +114,10 @@ class PagureFlaskIssuestests(tests.Modeltests): # Invalid user data['csrf_token'] = csrf_token output = self.app.post('/test/new_issue', data=data) - self.assertEqual(output.status_code, 200) - self.assertTrue( - '
\n New issue' - in output.data) - self.assertEqual(output.data.count( - 'This field is required.'), 0) - self.assertTrue( - '\n No user "username" found' - in output.data) + self.assertEqual(output.status_code, 404) + self.assertIn( + '

No such user found in the database: username

', + output.data) user.username = 'pingou' with tests.user_set(pagure.APP, user):