Skip to content

Commit 9737cdb

Browse files
committed
test: 修复路径导入错误,更新测试内容
Change-Id: I07823788f3f9c1ca4e431ff47412088d89f38ba0 Signed-off-by: OhYee <oyohyee@oyohyee.com>
1 parent c04335c commit 9737cdb

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

tests/e2e/__test_model_async_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import os
1919
import time
2020

21-
from pydantic_ai import ModelResponse
21+
from litellm.types.utils import ModelResponse
2222
import pydash
2323
import pytest
2424

tests/e2e/__test_sandbox_template_async_template.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import datetime
1414
import time
1515

16+
import pydash
1617
import pytest
1718

1819
from agentrun.sandbox import Sandbox, Template
@@ -263,7 +264,10 @@ async def test_update_template_async(self, template_name: str):
263264
# assert template.description == "原始描述"
264265
assert template.cpu == 2.0
265266
assert template.memory == 2048
266-
assert template.environment_variables == {"OLD_KEY": "old_value"}
267+
assert (
268+
pydash.get(template.environment_variables, "OLD_KEY")
269+
== "old_value"
270+
)
267271
assert template.created_at is not None
268272
created_at = datetime.datetime.strptime(
269273
template.created_at, "%Y-%m-%dT%H:%M:%S.%f%z"

tests/e2e/test_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import os
2929
import time
3030

31-
from pydantic_ai import ModelResponse
31+
from litellm.types.utils import ModelResponse
3232
import pydash
3333
import pytest
3434

tests/e2e/test_sandbox_template.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import datetime
2424
import time
2525

26+
import pydash
2627
import pytest
2728

2829
from agentrun.sandbox import Sandbox, Template
@@ -472,7 +473,10 @@ async def test_update_template_async(self, template_name: str):
472473
# assert template.description == "原始描述"
473474
assert template.cpu == 2.0
474475
assert template.memory == 2048
475-
assert template.environment_variables == {"OLD_KEY": "old_value"}
476+
assert (
477+
pydash.get(template.environment_variables, "OLD_KEY")
478+
== "old_value"
479+
)
476480
assert template.created_at is not None
477481
created_at = datetime.datetime.strptime(
478482
template.created_at, "%Y-%m-%dT%H:%M:%S.%f%z"
@@ -561,7 +565,10 @@ def test_update_template(self, template_name: str):
561565
# assert template.description == "原始描述"
562566
assert template.cpu == 2.0
563567
assert template.memory == 2048
564-
assert template.environment_variables == {"OLD_KEY": "old_value"}
568+
assert (
569+
pydash.get(template.environment_variables, "OLD_KEY")
570+
== "old_value"
571+
)
565572
assert template.created_at is not None
566573
created_at = datetime.datetime.strptime(
567574
template.created_at, "%Y-%m-%dT%H:%M:%S.%f%z"

0 commit comments

Comments
 (0)