summaryrefslogtreecommitdiff
path: root/tests/test_completion.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2019-07-16 17:30:23 -0600
committerkotfu <kotfu@kotfu.net>2019-07-16 17:30:23 -0600
commitf3ae3e129c9205229922463fc5ef57cc413c0ab9 (patch)
treebfe8b7eec20592de74725e5298dec68799f7ebec /tests/test_completion.py
parenta8c4a65106ad6325adec5e662ee8a5397527dba5 (diff)
parentf77abb09888c6ea3f6d8dadb28de46c36f035459 (diff)
downloadcmd2-git-f3ae3e129c9205229922463fc5ef57cc413c0ab9.tar.gz
Merge branch 'master' into integrate_legacy_documentation
# Conflicts: # docs/features/history.rst
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r--tests/test_completion.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py
index 1411cc49..3cee1955 100644
--- a/tests/test_completion.py
+++ b/tests/test_completion.py
@@ -174,20 +174,20 @@ def test_complete_macro(base_app, request):
assert first_match is not None and base_app.completion_matches == expected
-def test_matches_sort_key(cmd2_app):
+def test_default_sort_key(cmd2_app):
text = ''
line = 'test_sort_key {}'.format(text)
endidx = len(line)
begidx = endidx - len(text)
# First do alphabetical sorting
- cmd2_app.matches_sort_key = cmd2.cmd2.ALPHABETICAL_SORT_KEY
+ cmd2_app.default_sort_key = cmd2.cmd2.ALPHABETICAL_SORT_KEY
expected = ['1', '11', '2']
first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
assert first_match is not None and cmd2_app.completion_matches == expected
# Now switch to natural sorting
- cmd2_app.matches_sort_key = cmd2.cmd2.NATURAL_SORT_KEY
+ cmd2_app.default_sort_key = cmd2.cmd2.NATURAL_SORT_KEY
expected = ['1', '2', '11']
first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
assert first_match is not None and cmd2_app.completion_matches == expected