def test_valid_log_formats(self):
        """Test that only valid log formats are accepted"""
        # Test each valid format
        for fmt in LogFormat:
            with patch.dict(os.environ, {'MARQO_LOG_FORMAT': fmt, 'MARQO_LOG_LEVEL': 'info'}):
                # Should not raise an exception
                importlib.reload(marqo_logging)

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