updating tests

This commit is contained in:
João Moura
2024-09-23 03:58:41 -03:00
parent 7d981ba8ce
commit 59e51f18fd
98 changed files with 36353 additions and 16646 deletions

View File

@@ -321,8 +321,8 @@ def test_output_json_hierarchical():
manager_llm="gpt-4o",
)
result = crew.kickoff()
assert '{"score": 5}' == result.json
assert result.to_dict() == {"score": 5}
assert '{"score": 4}' == result.json
assert result.to_dict() == {"score": 4}
@pytest.mark.vcr(filter_headers=["authorization"])
@@ -526,7 +526,7 @@ def test_save_task_json_output():
output_file_exists = os.path.exists("score.json")
assert output_file_exists
assert {"score": 5} == json.loads(open("score.json").read())
assert {"score": 4} == json.loads(open("score.json").read())
if output_file_exists:
os.remove("score.json")
@@ -556,7 +556,7 @@ def test_save_task_pydantic_output():
output_file_exists = os.path.exists("score.json")
assert output_file_exists
assert {"score": 5} == json.loads(open("score.json").read())
assert {"score": 4} == json.loads(open("score.json").read())
if output_file_exists:
os.remove("score.json")
@@ -685,7 +685,7 @@ def test_increment_tool_errors():
with patch.object(Task, "increment_tools_errors") as increment_tools_errors:
increment_tools_errors.return_value = None
crew.kickoff()
assert len(increment_tools_errors.mock_calls) == 12
assert len(increment_tools_errors.mock_calls) == 9
def test_task_definition_based_on_dict():