Skip to content

Commit b5ca2b4

Browse files
fix failing test
1 parent 6c8be65 commit b5ca2b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_validate_python_code.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pydantic import ValidationError
33

44
from codeflash.api.aiservice import AiServiceClient
5-
from codeflash.models.models import CodeString
5+
from codeflash.models.models import CodeString, OptimizedCandidateSource
66

77

88
def test_python_string():
@@ -55,7 +55,7 @@ def test_generated_candidates_validation():
5555
"optimization_id": ""
5656
}
5757
]
58-
candidates = ai_service._get_valid_candidates(mock_generate_candidates)
58+
candidates = ai_service._get_valid_candidates(mock_generate_candidates, OptimizedCandidateSource.OPTIMIZE)
5959
assert len(candidates) == 0
6060
code = """```python:file.py
6161
print('Hello, World!')
@@ -67,5 +67,5 @@ def test_generated_candidates_validation():
6767
"optimization_id": ""
6868
}
6969
]
70-
candidates = ai_service._get_valid_candidates(mock_generate_candidates)
70+
candidates = ai_service._get_valid_candidates(mock_generate_candidates, OptimizedCandidateSource.OPTIMIZE)
7171
assert len(candidates) == 1

0 commit comments

Comments
 (0)