Skip to content

test: migrate web wraps controller tests to testcontainers#34289

Merged
asukaminato0721 merged 5 commits intolanggenius:mainfrom
YB0y:test/migrate-web-wraps-controller-tests-to-testcontainers
Mar 30, 2026
Merged

test: migrate web wraps controller tests to testcontainers#34289
asukaminato0721 merged 5 commits intolanggenius:mainfrom
YB0y:test/migrate-web-wraps-controller-tests-to-testcontainers

Conversation

@YB0y
Copy link
Copy Markdown
Contributor

@YB0y YB0y commented Mar 30, 2026

Summary

Migrate tests from api/tests/unit_tests/controllers/web/test_wraps.py to testcontainers integration tests at api/tests/test_containers_integration_tests/controllers/web/test_wraps.py.

Replaced Flask(__name__) with flask_app_with_containers fixture for TestDecodeJwtToken tests that need request context. All 20 tests migrated: _validate_webapp_token (7 tests for enterprise/public/system auth combinations), _validate_user_accessibility (8 tests for SSO, permissions, missing fields), and decode_jwt_token (5 tests for happy path, missing token/app/end_user, disabled site, user ID mismatch). External services remain mocked as tests verify auth decorator logic.

Part of #32454

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues.
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-30 14:20:23.772630171 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-30 14:20:13.368642696 +0000
@@ -668,6 +668,20 @@
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/controllers/console/helpers.py:40:48
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:72:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:95:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:107:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:125:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:143:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:160:29
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:177:33
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:95:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -2298,20 +2312,6 @@
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `end_user` with type `EndUser` in function `controllers.web.workflow_events.WorkflowEventsApi.get` [bad-argument-type]
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:65
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-  --> tests/unit_tests/controllers/web/test_wraps.py:83:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:106:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:118:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:137:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:155:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:173:29
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:190:33
 ERROR Argument `list[Unknown]` is not assignable to parameter `llm_response` with type `Generator[LLMResultChunk]` in function `core.agent.output_parser.cot_output_parser.CotAgentOutputParser.handle_react_stream_output` [bad-argument-type]
   --> tests/unit_tests/core/agent/output_parser/test_cot_output_parser.py:67:71
 ERROR No matching overload found for function `str.join` called with arguments: (list[AgentScratchpadUnit.Action | str]) [no-matching-overload]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-30 14:22:26.722367727 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-30 14:22:15.020442746 +0000
@@ -668,6 +668,20 @@
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/controllers/console/helpers.py:40:48
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:72:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:95:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:107:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:125:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:143:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:160:29
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:177:33
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:95:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -2298,20 +2312,6 @@
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `end_user` with type `EndUser` in function `controllers.web.workflow_events.WorkflowEventsApi.get` [bad-argument-type]
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:65
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-  --> tests/unit_tests/controllers/web/test_wraps.py:83:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:106:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:118:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:137:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:155:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:173:29
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:190:33
 ERROR Argument `list[Unknown]` is not assignable to parameter `llm_response` with type `Generator[LLMResultChunk]` in function `core.agent.output_parser.cot_output_parser.CotAgentOutputParser.handle_react_stream_output` [bad-argument-type]
   --> tests/unit_tests/core/agent/output_parser/test_cot_output_parser.py:67:71
 ERROR No matching overload found for function `str.join` called with arguments: (list[AgentScratchpadUnit.Action | str]) [no-matching-overload]

Comment thread api/tests/test_containers_integration_tests/controllers/web/test_wraps.py Outdated
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-30 15:22:09.733977734 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-30 15:21:58.472791852 +0000
@@ -670,6 +670,20 @@
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/controllers/console/helpers.py:40:48
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:74:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:97:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:109:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:127:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:145:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:162:29
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:179:33
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:95:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -2298,20 +2312,6 @@
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `end_user` with type `EndUser` in function `controllers.web.workflow_events.WorkflowEventsApi.get` [bad-argument-type]
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:65
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-  --> tests/unit_tests/controllers/web/test_wraps.py:83:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:106:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:118:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:137:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:155:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:173:29
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:190:33
 ERROR Argument `list[Unknown]` is not assignable to parameter `llm_response` with type `Generator[LLMResultChunk]` in function `core.agent.output_parser.cot_output_parser.CotAgentOutputParser.handle_react_stream_output` [bad-argument-type]
   --> tests/unit_tests/core/agent/output_parser/test_cot_output_parser.py:67:71
 ERROR No matching overload found for function `str.join` called with arguments: (list[AgentScratchpadUnit.Action | str]) [no-matching-overload]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-30 15:24:27.829323048 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-30 15:24:16.851346523 +0000
@@ -670,6 +670,20 @@
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/controllers/console/helpers.py:40:48
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:74:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:97:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:109:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:127:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:145:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:162:29
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:179:33
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:95:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -2298,20 +2312,6 @@
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `end_user` with type `EndUser` in function `controllers.web.workflow_events.WorkflowEventsApi.get` [bad-argument-type]
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:65
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-  --> tests/unit_tests/controllers/web/test_wraps.py:83:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:106:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:118:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:137:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:155:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:173:29
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:190:33
 ERROR Argument `list[Unknown]` is not assignable to parameter `llm_response` with type `Generator[LLMResultChunk]` in function `core.agent.output_parser.cot_output_parser.CotAgentOutputParser.handle_react_stream_output` [bad-argument-type]
   --> tests/unit_tests/core/agent/output_parser/test_cot_output_parser.py:67:71
 ERROR No matching overload found for function `str.join` called with arguments: (list[AgentScratchpadUnit.Action | str]) [no-matching-overload]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-30 15:42:16.092636678 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-30 15:42:05.238750669 +0000
@@ -670,6 +670,20 @@
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/controllers/console/helpers.py:40:48
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:74:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+  --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:97:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:109:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:127:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:145:33
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:162:29
+ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:179:33
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:95:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -2298,20 +2312,6 @@
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:48
 ERROR Argument `SimpleNamespace` is not assignable to parameter `end_user` with type `EndUser` in function `controllers.web.workflow_events.WorkflowEventsApi.get` [bad-argument-type]
    --> tests/unit_tests/controllers/web/test_workflow_events.py:125:65
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-  --> tests/unit_tests/controllers/web/test_wraps.py:83:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:106:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:118:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:137:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:155:33
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:173:29
-ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
-   --> tests/unit_tests/controllers/web/test_wraps.py:190:33
 ERROR Argument `list[Unknown]` is not assignable to parameter `llm_response` with type `Generator[LLMResultChunk]` in function `core.agent.output_parser.cot_output_parser.CotAgentOutputParser.handle_react_stream_output` [bad-argument-type]
   --> tests/unit_tests/core/agent/output_parser/test_cot_output_parser.py:67:71
 ERROR No matching overload found for function `str.join` called with arguments: (list[AgentScratchpadUnit.Action | str]) [no-matching-overload]

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Mar 30, 2026
@asukaminato0721 asukaminato0721 added this pull request to the merge queue Mar 30, 2026
Merged via the queue into langgenius:main with commit 5fc4dfa Mar 30, 2026
27 checks passed
@YB0y YB0y deleted the test/migrate-web-wraps-controller-tests-to-testcontainers branch April 1, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants