diff options
Diffstat (limited to 'tests/test_completion.py')
-rwxr-xr-x | tests/test_completion.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py index 48a055d0..ac4216bb 100755 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -65,13 +65,13 @@ class CompletionsExample(cmd2.Cmd): cmd2.Cmd.__init__(self, multiline_commands=['test_multiline']) self.foo = 'bar' self.add_settable(utils.Settable('foo', str, description="a settable param", - completer_method=CompletionsExample.complete_foo_val)) + completer=CompletionsExample.complete_foo_val)) def do_test_basic(self, args): pass def complete_test_basic(self, text, line, begidx, endidx): - return utils.basic_complete(text, line, begidx, endidx, food_item_strs) + return self.basic_complete(text, line, begidx, endidx, food_item_strs) def do_test_delimited(self, args): pass @@ -84,7 +84,7 @@ class CompletionsExample(cmd2.Cmd): def complete_test_sort_key(self, text, line, begidx, endidx): num_strs = ['2', '11', '1'] - return utils.basic_complete(text, line, begidx, endidx, num_strs) + return self.basic_complete(text, line, begidx, endidx, num_strs) def do_test_raise_exception(self, args): pass @@ -96,7 +96,7 @@ class CompletionsExample(cmd2.Cmd): pass def complete_test_multiline(self, text, line, begidx, endidx): - return utils.basic_complete(text, line, begidx, endidx, sport_item_strs) + return self.basic_complete(text, line, begidx, endidx, sport_item_strs) def do_test_no_completer(self, args): """Completing this should result in completedefault() being called""" @@ -541,7 +541,7 @@ def test_basic_completion_single(cmd2_app): endidx = len(line) begidx = endidx - len(text) - assert utils.basic_complete(text, line, begidx, endidx, food_item_strs) == ['Pizza'] + assert cmd2_app.basic_complete(text, line, begidx, endidx, food_item_strs) == ['Pizza'] def test_basic_completion_multiple(cmd2_app): text = '' @@ -549,7 +549,7 @@ def test_basic_completion_multiple(cmd2_app): endidx = len(line) begidx = endidx - len(text) - matches = sorted(utils.basic_complete(text, line, begidx, endidx, food_item_strs)) + matches = sorted(cmd2_app.basic_complete(text, line, begidx, endidx, food_item_strs)) assert matches == sorted(food_item_strs) def test_basic_completion_nomatch(cmd2_app): @@ -558,7 +558,7 @@ def test_basic_completion_nomatch(cmd2_app): endidx = len(line) begidx = endidx - len(text) - assert utils.basic_complete(text, line, begidx, endidx, food_item_strs) == [] + assert cmd2_app.basic_complete(text, line, begidx, endidx, food_item_strs) == [] def test_delimiter_completion(cmd2_app): text = '/home/' |