From bbbe449c53af6a91ec8261beede50f5789464c43 Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Jan 19 2016 15:21:03 +0000 Subject: Add test when csrf token is not verified --- diff --git a/tests/test_pagure_flask_ui_login.py b/tests/test_pagure_flask_ui_login.py index 5cefcb3..bbe31fc 100644 --- a/tests/test_pagure_flask_ui_login.py +++ b/tests/test_pagure_flask_ui_login.py @@ -194,7 +194,16 @@ class PagureFlaskLogintests(tests.Modeltests): '
', output.data) self.assertIn('Username or password invalid.', output.data) - + # When account is not confirmed i.e user_obj != None + data['password'] = 'barpass' + output = self.app.post('/dologin', data=data, follow_redirects=True) + self.assertEqual(output.status_code, 200) + self.assertIn('Login - Pagure', output.data) + self.assertIn( + '', output.data) + self.assertIn( + 'Invalid user, did you confirm the creation with the url ' + 'provided by email?', output.data) if __name__ == '__main__':