From eee1350ae42d7d31f0a279f351b084a4476bed37 Mon Sep 17 00:00:00 2001 From: Nitin Aggarwal Date: Tue, 16 Aug 2022 11:34:39 -0700 Subject: [PATCH] remove file --- tests/commands/test_upgrade.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 tests/commands/test_upgrade.py diff --git a/tests/commands/test_upgrade.py b/tests/commands/test_upgrade.py deleted file mode 100644 index 5c6d6eb4e..000000000 --- a/tests/commands/test_upgrade.py +++ /dev/null @@ -1,29 +0,0 @@ -from click.testing import CliRunner -from pytest_mock import MockFixture - -from opta.cli import cli -from opta.commands.upgrade import TEMP_INSTALLATION_FILENAME - - -def test_upgrade(mocker: MockFixture) -> None: - mock_check_version_upgrade = mocker.patch( - "opta.commands.upgrade.check_version_upgrade" - ) - mock_check_version_upgrade.return_value = True - mock_make_installation_file = mocker.patch( - "opta.commands.upgrade._make_installation_file" - ) - mock_upgrade_successful = mocker.patch("opta.commands.upgrade._upgrade_successful") - mock_cleanup_installation_file = mocker.patch( - "opta.commands.upgrade._cleanup_installation_file" - ) - mock_nice_run = mocker.patch("opta.commands.upgrade.nice_run") - - runner = CliRunner() - result = runner.invoke(cli, ["upgrade"]) - assert result.exit_code == 0 - mock_check_version_upgrade.assert_called_once_with(is_upgrade_call=True) - mock_make_installation_file.assert_called_once() - mock_nice_run.assert_called_once_with([f"./{TEMP_INSTALLATION_FILENAME}"], input=b"y") - mock_upgrade_successful.assert_called_once() - mock_cleanup_installation_file.assert_called_once()