summaryrefslogtreecommitdiffstats
path: root/tests/test_smart_completion_public_schema_only.py
diff options
context:
space:
mode:
authorkoljonen <koljonen@outlook.com>2016-05-15 18:35:22 +0200
committerkoljonen <koljonen@outlook.com>2016-05-15 18:35:22 +0200
commitfffa740fbcb7b6742b54ffb693ac38951f09587e (patch)
tree86b4a8944a68b1087491640e43329a7df144ed70 /tests/test_smart_completion_public_schema_only.py
parent17a2b3a4b7d8dc5f88323b98dc156d6234bf1d1d (diff)
Fix more test bugs ... apparently the able order can be indeterministic
Diffstat (limited to 'tests/test_smart_completion_public_schema_only.py')
-rw-r--r--tests/test_smart_completion_public_schema_only.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py
index 68d7cf33..2f5e3ab8 100644
--- a/tests/test_smart_completion_public_schema_only.py
+++ b/tests/test_smart_completion_public_schema_only.py
@@ -601,11 +601,14 @@ def test_wildcard_column_expansion_with_two_tables(completer, complete_event):
completions = completer.get_completions(
Document(text=sql, cursor_position=pos), complete_event)
- col_list = '"select".id, "select"."insert", "select"."ABC", u.id, u.email, u.first_name, u.last_name'
- expected = [Completion(text=col_list, start_position=-1,
- display='*', display_meta='columns')]
-
- assert expected == completions
+ # The order of the tables is indeterministic, so allwo both possibilities
+ cols1 = '"select".id, "select"."insert", "select"."ABC"'
+ cols2 = 'u.id, u.email, u.first_name, u.last_name'
+ expected = (Completion(text=text, start_position=-1,
+ display='*', display_meta='columns')
+ for text in (cols1 + ', ' + cols2, cols2 + ', ' + cols1))
+ assert len(completions) == 1
+ assert completions[0] in expected
def test_wildcard_column_expansion_with_two_tables_and_parent(completer, complete_event):