mirror of
https://github.com/langgenius/dify.git
synced 2026-04-30 23:48:04 +08:00
fix: correct mock patch paths in integration tests
- Change patch from 'services.account_service.sync_account_deletion' to 'services.enterprise.account_deletion_sync.sync_account_deletion' - Change patch from 'services.account_service.sync_workspace_member_removal' to 'services.enterprise.account_deletion_sync.sync_workspace_member_removal' - Functions are imported locally within methods, so must patch at source module Fixes CI test failures in PR #31519
This commit is contained in:
@ -1036,7 +1036,7 @@ class TestAccountService:
|
||||
|
||||
with (
|
||||
patch("services.account_service.delete_account_task") as mock_delete_task,
|
||||
patch("services.account_service.sync_account_deletion") as mock_sync,
|
||||
patch("services.enterprise.account_deletion_sync.sync_account_deletion") as mock_sync,
|
||||
):
|
||||
mock_sync.return_value = True
|
||||
|
||||
@ -1759,7 +1759,7 @@ class TestTenantService:
|
||||
TenantService.create_tenant_member(tenant, member_account, role="normal")
|
||||
|
||||
# Remove member
|
||||
with patch("services.account_service.sync_workspace_member_removal") as mock_sync:
|
||||
with patch("services.enterprise.account_deletion_sync.sync_workspace_member_removal") as mock_sync:
|
||||
mock_sync.return_value = True
|
||||
|
||||
TenantService.remove_member_from_tenant(tenant, member_account, owner_account)
|
||||
|
||||
Reference in New Issue
Block a user