Add tests/test_debug_queries.py