def test_valid_log_levels(self):
        """Test that only valid log levels are accepted"""
        # Test each valid level
        for level in LogLevel:
            with patch.dict(os.environ, {'MARQO_LOG_LEVEL': level, 'MARQO_LOG_FORMAT': 'plain'}):
                # Should not raise an exception
                importlib.reload(marqo_logging)  # Need to reload module to re-execute the config

        # Test invalid level
        with patch.dict(os.environ, {'MARQO_LOG_LEVEL': 'invalid', 'MARQO_LOG_FORMAT': 'plain'}):
            with self.assertRaises(EnvVarError) as context:
                importlib.reload(marqo_logging)
            self.assertIn('`MARQO_LOG_LEVEL` = `invalid` is not supported', str(context.exception))
Test that only valid log levels are accepted
tests/unit_tests/marqo/test_logging.py