def test_destruct_should_call_rm_dir(self, rmdir_mock, *args): storage = InstallationStorage() storage.destruct() rmdir_mock.assert_called()
def test_destruct_rmdir_should_fail(self, *args): storage = InstallationStorage() with pytest.raises(InstallationStorageError): storage.destruct()