def test_suggested_join_conditions_with_same_table_twice(self, completer, text): result = get_result(completer, text) self.assertListEqual(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(self, completer, text): result = result_set(completer, text) self.assertSetEqual( result, set([ alias('users'), alias('shipments'), name_join('shipments.id = users.id'), fk_join('shipments.user_id = users.id') ]))
def test_cased_join_conditions(self, completer, text): result = result_set(completer, text) self.assertSetEqual(result, set( [alias('U'), alias('U2'), fk_join('U2.UserID = U.ID')] ))
def test_suggested_join_conditions(self, completer, text): result = result_set(completer, text) self.assertSetEqual(result, set([ alias('U'), alias('U2'), fk_join('U2.userid = U.id') ]))