mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
refactor: Enable G logging rules and comprehensive ruff improvements (#35081)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
e1a2e4843a
commit
088ecdd0bf
@@ -77,12 +77,14 @@ class TestThemeDAO:
|
||||
# Call the method
|
||||
result = ThemeDAO.find_system_default()
|
||||
|
||||
# Verify warning was logged
|
||||
# Verify warning was logged with lazy logging format
|
||||
mock_logger.warning.assert_called_once()
|
||||
call_args = mock_logger.warning.call_args
|
||||
assert (
|
||||
"Multiple system default themes found (2)"
|
||||
in mock_logger.warning.call_args[0][0]
|
||||
call_args[0][0]
|
||||
== "Multiple system default themes found (%s), falling back to config theme"
|
||||
)
|
||||
assert call_args[0][1] == 2
|
||||
|
||||
# Verify the result is the fallback theme
|
||||
assert result == mock_fallback
|
||||
@@ -169,12 +171,14 @@ class TestThemeDAO:
|
||||
# Call the method
|
||||
result = ThemeDAO.find_system_dark()
|
||||
|
||||
# Verify warning was logged
|
||||
# Verify warning was logged with lazy logging format
|
||||
mock_logger.warning.assert_called_once()
|
||||
call_args = mock_logger.warning.call_args
|
||||
assert (
|
||||
"Multiple system dark themes found (2)"
|
||||
in mock_logger.warning.call_args[0][0]
|
||||
call_args[0][0]
|
||||
== "Multiple system dark themes found (%s), falling back to config theme"
|
||||
)
|
||||
assert call_args[0][1] == 2
|
||||
|
||||
# Verify the result is the fallback theme
|
||||
assert result == mock_fallback
|
||||
|
||||
Reference in New Issue
Block a user