mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
test: satisfy strict network access checks
This commit is contained in:
1 parent
2c254a4a70
commit
5fad259ed1
2 files changed
+2
-1
No files matched your search
@@ -296,6 +296,7 @@ def test_upstream_error_mapping(status_code: int, expected_exception: type[HTTPE
|
||||
def test_conflict_error_mapping_preserves_safe_actionable_reason(reason: str, expected_message: str) -> None:
|
||||
error = _translate_upstream_error(NetworkAccessGroupUpstreamError(409, reason))
|
||||
assert isinstance(error, Conflict)
|
||||
assert error.description is not None
|
||||
assert expected_message in error.description
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ def billing_config() -> Iterator[None]:
|
||||
def test_group_list_and_item_reads_use_authenticated_saas_endpoints() -> None:
|
||||
response = MagicMock(status_code=httpx.codes.OK)
|
||||
response.json.side_effect = [
|
||||
{"tenant_id": TENANT_ID, "entitled": True, "groups": []},
|
||||
{"tenant_id": TENANT_ID, "entitled": True, "groups": list[object]()},
|
||||
{"group": {"id": GROUP_ID}},
|
||||
]
|
||||
|
||||
|
||||
Reference in new issue
Block a user