import pytest from src.backend.logic.look_data.looks import at from tests_backend.conftest import get_all_functions_in_module, is_valid_sql @pytest.mark.parametrize("function", get_all_functions_in_module(at)) def test_valid_sql(function): try: assert is_valid_sql(function(label_id=123)), "SQL validation failed" except RuntimeError: pass # Skip functions that are merely reserving a name (e.g. at7) @pytest.mark.asyncio async def test_at7(): with pytest.raises(RuntimeError): await at.at7()