def test_suggested_join_conditions_with_same_table_twice(completer, text): result = get_result(completer, text) assert result == [ fk_join('u2.userid = u.id'), fk_join('u2.userid = users.id'), name_join('u2.userid = "Users".userid'), name_join('u2.username = "******".username'), alias('u'), alias('u2'), alias('users'), alias('"Users"') ]
def test_suggested_join_conditions_with_same_table_twice(completer, complete_event, text): position = len(text) result = completer.get_completions( Document(text=text, cursor_position=position), complete_event) assert result == [ fk_join('u2.userid = u.id'), fk_join('u2.userid = users.id'), name_join('u2.userid = "Users".userid'), name_join('u2.username = "******".username'), alias('"Users"'), alias('u'), alias('u2'), alias('users')]
def test_suggested_join_conditions_with_same_table_twice( completer, complete_event, text): position = len(text) result = completer.get_completions( Document(text=text, cursor_position=position), complete_event) assert result == [ fk_join('u2.userid = u.id'), fk_join('u2.userid = users.id'), name_join('u2.userid = "Users".userid'), name_join('u2.username = "******".username'), alias('u'), alias('u2'), alias('users'), alias('"Users"') ]
def test_suggested_join_conditions(completer, complete_event, text): result = set(completer.get_completions( Document(text=text,), complete_event)) assert set(result) == set([ alias('U'), alias('U2'), fk_join('U2.userid = U.id')])
def test_cased_join_conditions(cased_completer, complete_event, text): result = set(cased_completer.get_completions( Document(text=text), complete_event)) assert set(result) == set([ alias('U'), alias('U2'), fk_join('U2.UserID = U.ID')])
def test_suggested_join_conditions(completer, text): result = get_result(completer, text) assert completions_to_set(result) == completions_to_set([ alias('users'), alias('shipments'), name_join('shipments.id = users.id'), fk_join('shipments.user_id = users.id')])
def test_suggested_join_conditions(completer, text): result = result_set(completer, text) assert result == set([ alias('users'), alias('shipments'), name_join('shipments.id = users.id'), fk_join('shipments.user_id = users.id')])
def test_suggested_join_conditions(completer, text): result = get_result(completer, text) assert completions_to_set(result) == completions_to_set([ alias("users"), alias("shipments"), name_join("shipments.id = users.id"), fk_join("shipments.user_id = users.id"), ])
def test_suggested_join_conditions(completer, complete_event, text): position = len(text) result = set(completer.get_completions( Document(text=text, cursor_position=position), complete_event)) assert set(result) == set([ alias('u'), alias('u2'), fk_join('u2.userid = u.id')])
def test_suggested_join_conditions(completer, complete_event, text): position = len(text) result = set(completer.get_completions( Document(text=text, cursor_position=position), complete_event)) assert set(result) == set([ alias('users'), alias('shipments'), name_join('shipments.id = users.id'), fk_join('shipments.user_id = users.id')])
def test_cased_join_conditions(completer, text): result = get_result(completer, text) assert completions_to_set(result) == completions_to_set( [alias('U'), alias('U2'), fk_join('U2.UserID = U.ID')] )
def test_suggested_join_conditions(completer, text): result = get_result(completer, text) assert completions_to_set(result) == completions_to_set([ alias('U'), alias('U2'), fk_join('U2.userid = U.id') ])
def test_cased_join_conditions(completer, text): result = result_set(completer, text) assert result == set( [alias('U'), alias('U2'), fk_join('U2.UserID = U.ID')] )
def test_suggested_join_conditions(completer, text): result = result_set(completer, text) assert result == set([ alias('U'), alias('U2'), fk_join('U2.userid = U.id') ])