Skip to content

Commit

Permalink
without mock_questionary again
Browse files Browse the repository at this point in the history
  • Loading branch information
nalbion committed Oct 4, 2023
1 parent 796821a commit 4abed31
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pilot/helpers/agents/test_Developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ def generate_response(*args, **kwargs):

mock_questionary = MockQuestionary([''])

with patch('utils.questionary.questionary', mock_questionary):
# When
result = self.developer.test_code_changes(monkey, convo)
# with patch('utils.questionary.questionary', mock_questionary):
# When
result = self.developer.test_code_changes(monkey, convo)

# Then
assert result == {'success': True, 'cli_response': 'stdout:\n```\n\n```'}
assert mock_requests_post.call_count == 3
assert "The JSON is invalid at $.type - 'command' is not one of ['automated_test', 'command_test', 'manual_test', 'no_test']" in json_received[1]['messages'][3]['content']
assert mock_execute.call_count == 1
# Then
assert result == {'success': True, 'cli_response': 'stdout:\n```\n\n```'}
assert mock_requests_post.call_count == 3
assert "The JSON is invalid at $.type - 'command' is not one of ['automated_test', 'command_test', 'manual_test', 'no_test']" in json_received[1]['messages'][3]['content']
assert mock_execute.call_count == 1

0 comments on commit 4abed31

Please sign in to comment.