From 47ccacf0ef335a67d959ecd2dbe50120c3cb1d10 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 23 2017 17:06:12 +0000 Subject: Small clean up in a test to use patch() to adjust the configuration Signed-off-by: Pierre-Yves Chibon --- diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py index 92843ba..691fdef 100644 --- a/tests/test_pagure_flask_ui_repo.py +++ b/tests/test_pagure_flask_ui_repo.py @@ -2600,7 +2600,7 @@ index 0000000..fb7093d '' in output.data) - + @patch.dict('pagure.APP.config', {'ENABLE_DEL_PROJECTS': False}) @patch('pagure.lib.notify.send_email') @patch('pagure.ui.repo.admin_session_timedout') def test_delete_repo_when_turned_off(self, ast, send_email): @@ -2608,7 +2608,6 @@ index 0000000..fb7093d turned off in the pagure instance """ ast.return_value = False send_email.return_value = True - pagure.APP.config['ENABLE_DEL_PROJECTS'] = False # No Git repo output = self.app.post('/foo/delete') @@ -2814,8 +2813,6 @@ index 0000000..fb7093d '/fork/pingou/test3/delete', follow_redirects=True) self.assertEqual(output.status_code, 404) - pagure.APP.config['ENABLE_DEL_PROJECTS'] = True - @patch('pagure.lib.notify.send_email') @patch('pagure.ui.repo.admin_session_timedout') def test_delete_repo(self, ast, send_email):