def test_relation_filter_no_schemas():
    query = 'Select foo from bar where {relations}'
    relations_config = [{'relation_name': 'persons', 'schemas': [ALL_SCHEMAS]}]
    relations = RelationsManager(relations_config)
    query_filter = relations.filter_relation_query(query, SCHEMA_NAME)
    assert (query_filter == "Select foo from bar where ( relname = 'persons' )")
def test_relation_filter_no_schemas():
    query = 'Select foo from bar where {relations}'
    relations_config = [{'relation_name': 'persons', 'schemas': [ALL_SCHEMAS]}]
    relations = RelationsManager(relations_config)
    query_filter = relations.filter_relation_query(query, SCHEMA_NAME)
    assert (query_filter == "Select foo from bar where ( relname = 'persons' )")