def test_on_suggests_tables_and_join_conditions_right_side(sql): suggestions = suggest_type(sql, sql) tables = ((None, "abc", None, False), (None, "bcd", None, False)) assert set(suggestions) == { JoinCondition(table_refs=tables, parent=None), Alias(aliases=("abc", "bcd")), }
def test_on_suggests_tables_and_join_conditions_right_side(sql): suggestions = suggest_type(sql, sql) tables = ((None, 'abc', None, False), (None, 'bcd', None, False)) assert set(suggestions) == set(( JoinCondition(table_refs=tables, parent=None), Alias(aliases=( 'abc', 'bcd', )), ))
def test_on_suggests_aliases_and_join_conditions(sql): suggestions = suggest_type(sql, sql) assert set(suggestions) == set(( JoinCondition(tables=((None, 'abc', 'a', False), (None, 'bcd', 'b', False)), parent=None), Alias(aliases=( 'a', 'b', )), ))
def test_on_suggests_aliases_right_side(sql): suggestions = suggest_type(sql, sql) assert suggestions == (Alias(aliases=( 'a', 'b', )), )
def test_on_suggests_tables(sql): suggestions = suggest_type(sql, sql) assert suggestions == (Alias(aliases=( 'abc', 'bcd', )), )
def test_on_suggests_aliases_and_join_conditions(sql): suggestions = suggest_type(sql, sql) tables = ((None, "abc", "a", False), (None, "bcd", "b", False)) assert set(suggestions) == set( (JoinCondition(table_refs=tables, parent=None), Alias(aliases=("a", "b"))))