From 9a775c266e4b3e948bc7913fc3fbb29e0807b41e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Dec 03 2017 16:50:46 +0000 Subject: Drop check on calling fedmsg fedmsg is called by the workers not the main process so using mock here will simply not work. This fixes running the tests. 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 77b8c52..ea20d0e 100644 --- a/tests/test_pagure_flask_ui_repo.py +++ b/tests/test_pagure_flask_ui_repo.py @@ -2996,8 +2996,7 @@ index 0000000..fb7093d @patch('pagure.lib.notify.send_email') @patch('pagure.ui.repo.admin_session_timedout') - @patch('pagure.lib.notify.log') - def test_delete_repo(self, mock_log, ast, send_email): + def test_delete_repo(self, ast, send_email): """ Test the delete_repo endpoint. """ ast.return_value = False send_email.return_value = True @@ -3264,8 +3263,6 @@ index 0000000..fb7093d 'Forks 0', output.data) - mock_log.assert_called_with(ANY, topic='project.deleted', msg=ANY) - @patch.dict('pagure.APP.config', {'TICKETS_FOLDER': None}) @patch('pagure.lib.notify.send_email', MagicMock(return_value=True)) @patch('pagure.ui.repo.admin_session_timedout', MagicMock(return_value=False))