diff --git a/test/test_solve_issue_in_repository.py b/test/test_solve_issue_in_repository.py index 5eb9083..6d8bdf2 100644 --- a/test/test_solve_issue_in_repository.py +++ b/test/test_solve_issue_in_repository.py @@ -23,10 +23,11 @@ class TestSolveIssueInRepository: self.issue_description = "This is a test issue" self.issue_number = "123" + @patch('aider_gitea.secrets.llm_api_key', return_value="fake-api-key") @patch('aider_gitea.run_cmd') @patch('aider_gitea.push_changes') @patch('subprocess.run') - def test_solve_issue_with_aider_changes(self, mock_subprocess_run, mock_push_changes, mock_run_cmd): + def test_solve_issue_with_aider_changes(self, mock_subprocess_run, mock_push_changes, mock_run_cmd, mock_llm_api_key): # Setup mocks mock_run_cmd.return_value = True mock_push_changes.return_value = True @@ -53,10 +54,11 @@ class TestSolveIssueInRepository: assert mock_run_cmd.call_count >= 8 # Verify all expected commands were run mock_push_changes.assert_called_once() + @patch('aider_gitea.secrets.llm_api_key', return_value="fake-api-key") @patch('aider_gitea.run_cmd') @patch('aider_gitea.push_changes') @patch('subprocess.run') - def test_solve_issue_without_aider_changes(self, mock_subprocess_run, mock_push_changes, mock_run_cmd): + def test_solve_issue_without_aider_changes(self, mock_subprocess_run, mock_push_changes, mock_run_cmd, mock_llm_api_key): # Setup mocks mock_run_cmd.return_value = True