mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-21 22:08:21 +00:00
Update md5 to sha3256
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import hashlib
|
||||
from hashlib import sha256
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from crewai.agents.agent_builder.base_agent import BaseAgent
|
||||
@@ -32,5 +32,5 @@ def test_key():
|
||||
goal="test goal",
|
||||
backstory="test backstory",
|
||||
)
|
||||
hash = hashlib.md5("test role|test goal|test backstory".encode()).hexdigest()
|
||||
hash = sha256("test role|test goal|test backstory".encode()).hexdigest()
|
||||
assert agent.key == hash
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Test Agent creation and execution basic functionality."""
|
||||
|
||||
import hashlib
|
||||
from hashlib import sha256
|
||||
import json
|
||||
from concurrent.futures import Future
|
||||
from unittest import mock
|
||||
@@ -2328,7 +2328,7 @@ def test_key():
|
||||
process=Process.sequential,
|
||||
tasks=tasks,
|
||||
)
|
||||
hash = hashlib.md5(
|
||||
hash = sha256(
|
||||
f"{researcher.key}|{writer.key}|{tasks[0].key}|{tasks[1].key}".encode()
|
||||
).hexdigest()
|
||||
|
||||
@@ -2368,7 +2368,7 @@ def test_key_with_interpolated_inputs():
|
||||
process=Process.sequential,
|
||||
tasks=tasks,
|
||||
)
|
||||
hash = hashlib.md5(
|
||||
hash = sha256(
|
||||
f"{researcher.key}|{writer.key}|{tasks[0].key}|{tasks[1].key}".encode()
|
||||
).hexdigest()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Test Agent creation and execution basic functionality."""
|
||||
|
||||
import hashlib
|
||||
from hashlib import sha256
|
||||
import json
|
||||
import os
|
||||
from unittest.mock import MagicMock, patch
|
||||
@@ -819,7 +819,7 @@ def test_key():
|
||||
description=original_description,
|
||||
expected_output=original_expected_output,
|
||||
)
|
||||
hash = hashlib.md5(
|
||||
hash = sha256(
|
||||
f"{original_description}|{original_expected_output}".encode()
|
||||
).hexdigest()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user