Feature:during account initialization, set the interface language to be consistent with the display language(#27029) (#27042)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
feelshana
2025-10-21 15:53:12 +08:00
committed by GitHub
parent 9a9d6a4a2b
commit 2bcf96565a
10 changed files with 33 additions and 13 deletions

View File

@@ -58,6 +58,7 @@ def setup_account(request) -> Generator[Account, None, None]:
name=name,
password=secrets.token_hex(16),
ip_address="localhost",
language="en-US",
)
with _CACHED_APP.test_request_context():

View File

@@ -2299,6 +2299,7 @@ class TestRegisterService:
name=admin_name,
password=admin_password,
ip_address=ip_address,
language="en-US",
)
# Verify account was created
@@ -2348,6 +2349,7 @@ class TestRegisterService:
name=admin_name,
password=admin_password,
ip_address=ip_address,
language="en-US",
)
# Verify no entities were created (rollback worked)

View File

@@ -893,7 +893,7 @@ class TestRegisterService:
mock_dify_setup.return_value = mock_dify_setup_instance
# Execute test
RegisterService.setup("admin@example.com", "Admin User", "password123", "192.168.1.1")
RegisterService.setup("admin@example.com", "Admin User", "password123", "192.168.1.1", "en-US")
# Verify results
mock_create_account.assert_called_once_with(
@@ -925,6 +925,7 @@ class TestRegisterService:
"Admin User",
"password123",
"192.168.1.1",
"en-US",
)
# Verify rollback operations were called