mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fixed test
This commit is contained in:
@@ -102,15 +102,15 @@ def test_get_graph_blocks(
|
||||
mock_block.id = "test-block"
|
||||
mock_block.disabled = False
|
||||
|
||||
# Mock get_blocks in cache module where it's actually used
|
||||
# Mock get_blocks where it's imported at the top of v1.py
|
||||
mocker.patch(
|
||||
"backend.server.routers.cache.get_blocks",
|
||||
"backend.server.routers.v1.get_blocks",
|
||||
return_value={"test-block": lambda: mock_block},
|
||||
)
|
||||
|
||||
# Mock block costs where it's imported inside the function
|
||||
mocker.patch(
|
||||
"backend.data.credit.get_block_cost",
|
||||
"backend.server.routers.v1.get_block_cost",
|
||||
return_value=[{"cost": 10, "type": "credit"}],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user