summaryrefslogtreecommitdiffstats
path: root/tests/test_smart_completion_public_schema_only.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_smart_completion_public_schema_only.py')
-rw-r--r--tests/test_smart_completion_public_schema_only.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py
index 5bc745f2..9f78c49f 100644
--- a/tests/test_smart_completion_public_schema_only.py
+++ b/tests/test_smart_completion_public_schema_only.py
@@ -610,16 +610,19 @@ def test_wildcard_column_expansion_with_alias_qualifier(completer, complete_even
assert expected == completions
-
-def test_wildcard_column_expansion_with_table_qualifier(completer, complete_event):
- sql = 'SELECT users.* FROM users'
+@pytest.mark.parametrize('text,expected', [
+ ('SELECT users.* FROM users',
+ 'id, users.email, users.first_name, users.last_name'),
+ ('SELECT Users.* FROM Users',
+ 'id, Users.email, Users.first_name, Users.last_name'),
+])
+def test_wildcard_column_expansion_with_table_qualifier(completer, complete_event, text, expected):
pos = len('SELECT users.*')
completions = completer.get_completions(
- Document(text=sql, cursor_position=pos), complete_event)
+ Document(text=text, cursor_position=pos), complete_event)
- col_list = 'id, users.email, users.first_name, users.last_name'
- expected = [Completion(text=col_list, start_position=-1,
+ expected = [Completion(text=expected, start_position=-1,
display='*', display_meta='columns')]
assert expected == completions