summaryrefslogtreecommitdiffstats
path: root/tests/test_sqlcompletion.py
diff options
context:
space:
mode:
authorIryna Cherniavska <i.chernyavska@gmail.com>2015-01-19 17:03:44 -0800
committerIryna Cherniavska <i.chernyavska@gmail.com>2015-01-19 17:03:44 -0800
commit13f3af72c3a65f88a8dbbc53d4619bbcb8ec67e7 (patch)
tree4e93b1a2f3cdf19b3e8f5afd0d54b21f29802b1f /tests/test_sqlcompletion.py
parentb78b81ea15e42c74400e3590f47555ad72739f2a (diff)
ON keyword now suggests tables and aliases on the right side of equal sign also.
Diffstat (limited to 'tests/test_sqlcompletion.py')
-rw-r--r--tests/test_sqlcompletion.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_sqlcompletion.py b/tests/test_sqlcompletion.py
index 949321e7..df0cdc7c 100644
--- a/tests/test_sqlcompletion.py
+++ b/tests/test_sqlcompletion.py
@@ -127,3 +127,17 @@ def test_on_suggests_tables():
'select abc.x, bcd.y from abc join bcd on ')
assert category == 'tables-or-aliases'
assert set(scope) == set(['abc', 'bcd'])
+
+def test_on_suggests_aliases_right_side():
+ category, scope = suggest_type(
+ 'select a.x, b.y from abc a join bcd b on a.id = ',
+ 'select a.x, b.y from abc a join bcd b on a.id = ')
+ assert category == 'tables-or-aliases'
+ assert set(scope) == set(['a', 'b'])
+
+def test_on_suggests_tables_right_side():
+ category, scope = suggest_type(
+ 'select abc.x, bcd.y from abc join bcd on ',
+ 'select abc.x, bcd.y from abc join bcd on ')
+ assert category == 'tables-or-aliases'
+ assert set(scope) == set(['abc', 'bcd'])