From 4f99e1823ebb7f6ed50a44515c914bbba2ab1ca6 Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler Date: Thu, 2 Jul 2020 01:52:15 +0200 Subject: [PATCH] Fix tests not expexting to actually run on GitHub actions --- tests/cli_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/cli_test.py b/tests/cli_test.py index 244eb9ad..9c361b4d 100644 --- a/tests/cli_test.py +++ b/tests/cli_test.py @@ -18,6 +18,7 @@ def test_debug(mock_wear, mock_log): mock_log.assert_has_calls([mock.call('Testing coveralls-python...')]) +@mock.patch.dict(os.environ, clear=True) @mock.patch.object(coveralls.cli.log, 'info') @mock.patch.object(coveralls.Coveralls, 'wear') def test_debug_no_token(mock_wear, mock_log): @@ -74,6 +75,7 @@ def test_save_report_to_file(mock_coveralls): mock_coveralls.assert_called_with('test.log') +@mock.patch.dict(os.environ, clear=True) @mock.patch.object(coveralls.Coveralls, 'save_report') def test_save_report_to_file_no_token(mock_coveralls): """Check save_report api usage when token is not set."""