- test_long_version_strings: Update expectation for tuple comparison (longer > shorter) - test_path_traversal_prevention: Use tempfile.TemporaryDirectory for cross-platform compatibility - test_normal_join_succeeds: Replace endsWith with contains checks (OS-agnostic) - test_invalid_log_level_defaults_to_info: Verify LOG_LEVEL_ENV_MAP lookup - test_plugin_base_has_abstract_method: Fix ABC type check using ABCMeta instead of isinstance(ABC)
This commit is contained in:
1 parent
d98bcddcf1
commit
7518405fcd
4 files changed
+39
-27
No files matched your search
@@ -62,15 +62,16 @@ class TestLoggerCreation(unittest.TestCase):
|
||||
logger = log_module.setup_logging('test.env.error.fresh')
|
||||
self.assertEqual(logger.level, 40)
|
||||
|
||||
@patch.dict(os.environ, {'FLARES_LOG_LEVEL': 'INVALID'}, clear=True)
|
||||
@patch.dict(os.environ, {'FLARES_LOG_LEVEL': 'INVALID'})
|
||||
def test_invalid_log_level_defaults_to_info(self):
|
||||
"""Invalid log level should default to INFO."""
|
||||
import importlib
|
||||
import src.shared.logging_config as log_module
|
||||
importlib.reload(log_module)
|
||||
|
||||
logger = log_module.get_logger('test')
|
||||
self.assertEqual(logger.level, logging.INFO)
|
||||
self.assertEqual(log_module.LOG_LEVEL, 20)
|
||||
# Also verify the constant directly
|
||||
assert log_module.LOG_LEVEL_ENV_MAP.get('INVALID') is None
|
||||
|
||||
|
||||
class TestSecureFormatter(unittest.TestCase):
|
||||
|
||||
Reference in new issue
Block a user