summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAmjith Ramanujam <amjith.r@gmail.com>2015-03-08 17:50:23 -0700
committerAmjith Ramanujam <amjith.r@gmail.com>2015-03-08 17:50:23 -0700
commit55120a99589eaf896a4b56cf347affb686445f33 (patch)
tree45fd8e579c120ee3d7ff91561c0b1133dba894c3 /tests
parentdab63ee30bceb2070ea66882f68de7d6de61fcd3 (diff)
parent2b85eaecb0512af10548a4f275c26ce8853116dd (diff)
Merge pull request #170 from darikg/better_dots
Better handle schema qualifications in current word
Diffstat (limited to 'tests')
-rw-r--r--tests/test_smart_completion_multiple_schemata.py4
-rw-r--r--tests/test_sqlcompletion.py6
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_smart_completion_multiple_schemata.py b/tests/test_smart_completion_multiple_schemata.py
index 66653f62..6190d774 100644
--- a/tests/test_smart_completion_multiple_schemata.py
+++ b/tests/test_smart_completion_multiple_schemata.py
@@ -145,9 +145,7 @@ def test_suggested_table_names_with_schema_dot(completer, complete_event):
assert set(result) == set([
Completion(text='users', start_position=0),
Completion(text='products', start_position=0),
- Completion(text='shipments', start_position=0),
- Completion(text='func3', start_position=0),
- Completion(text='func4', start_position=0)])
+ Completion(text='shipments', start_position=0)])
def test_suggested_column_names_with_qualified_alias(completer, complete_event):
"""
diff --git a/tests/test_sqlcompletion.py b/tests/test_sqlcompletion.py
index 1e3ae66b..063bf28c 100644
--- a/tests/test_sqlcompletion.py
+++ b/tests/test_sqlcompletion.py
@@ -253,3 +253,9 @@ def test_specials_not_included_after_initial_token():
'create table foo (dt d')
assert sorted_dicts(suggestions) == sorted_dicts([{'type': 'keyword'}])
+
+
+def test_drop_schema_qualified_table_suggests_only_tables():
+ text = 'DROP TABLE schema_name.table_name'
+ suggestions = suggest_type(text, text)
+ assert suggestions == [{'type': 'table', 'schema': 'schema_name'}] \ No newline at end of file