diff options
author | Daniel Rocco <drocco@gmail.com> | 2015-02-24 12:44:32 -0500 |
---|---|---|
committer | Daniel Rocco <drocco@gmail.com> | 2015-02-24 12:44:32 -0500 |
commit | 840f3bd3a805a4cf3f824e37eb2e423756d52379 (patch) | |
tree | 2a37146ec6fddd7cc0980843fe7f91ebd0448926 /tests | |
parent | 4d60c92184f78e91bed729db0adb2a0272a9c6b5 (diff) |
Add completion for CREATE WITH TEMPLATE
Closes #156
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_sqlcompletion.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_sqlcompletion.py b/tests/test_sqlcompletion.py index 4c28d9d4..f24b669e 100644 --- a/tests/test_sqlcompletion.py +++ b/tests/test_sqlcompletion.py @@ -177,13 +177,13 @@ def test_on_suggests_tables(): 'select abc.x, bcd.y from abc join bcd on ', 'select abc.x, bcd.y from abc join bcd on ') assert suggestions == [{'type': 'alias', 'aliases': ['abc', 'bcd']}] - + def test_on_suggests_aliases_right_side(): suggestions = 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 suggestions == [{'type': 'alias', 'aliases': ['a', 'b']}] - + def test_on_suggests_tables_right_side(): suggestions = suggest_type( 'select abc.x, bcd.y from abc join bcd on ', @@ -232,3 +232,9 @@ def test_3_statements_2nd_current(): {'type': 'column', 'tables': [(None, 'b', None)]}, {'type': 'function', 'schema': []}]) + +def test_create_db_with_template(): + suggestions = suggest_type('create database foo with template ', + 'create database foo with template ') + + assert sorted_dicts(suggestions) == sorted_dicts([{'type': 'database'}]) |