Ruff pass before starting Aider #72

Merged
Jmaa merged 3 commits from issue-47-ruff-pass-before-starting-aider into main 2025-04-15 07:33:00 +00:00
Showing only changes of commit 6c4e17999b - Show all commits

View File

@ -23,10 +23,11 @@ class TestSolveIssueInRepository:
self.issue_description = "This is a test issue" self.issue_description = "This is a test issue"
self.issue_number = "123" self.issue_number = "123"
@patch('aider_gitea.secrets.llm_api_key', return_value="fake-api-key")
@patch('aider_gitea.run_cmd') @patch('aider_gitea.run_cmd')
@patch('aider_gitea.push_changes') @patch('aider_gitea.push_changes')
@patch('subprocess.run') @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 # Setup mocks
mock_run_cmd.return_value = True mock_run_cmd.return_value = True
mock_push_changes.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 assert mock_run_cmd.call_count >= 8 # Verify all expected commands were run
mock_push_changes.assert_called_once() 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.run_cmd')
@patch('aider_gitea.push_changes') @patch('aider_gitea.push_changes')
@patch('subprocess.run') @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 # Setup mocks
mock_run_cmd.return_value = True mock_run_cmd.return_value = True