Skip to content

Commit 5adca9e

Browse files
committed
Update load_completions test to use new CompletionIndex attributes.
CompletionIndex was recently refactored locally (prior to the initial commit for the lexer feature) to use attributes for commands, subcommands, args_opts, global_opts rather than returning the equivalent 4 element tuple in load_completions. This change updates the tests accordingly.
1 parent 23f3b58 commit 5adca9e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/unit/test_load_completions.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ def setUp(self):
3838
self.completion_index.load_index = lambda x: DATA
3939

4040
def test_load_completions(self):
41-
commands, subcommands, args_opts, global_opts = \
42-
self.completion_index.load_completions()
43-
assert commands == ['devicefarm', 'foo']
44-
assert subcommands == ['create-device-pool', 'bar']
45-
assert args_opts == set(['--project-arn', '--name', '--baz'])
46-
assert global_opts == ['--debug', '--endpoint-url']
41+
assert self.completion_index.commands == [
42+
'devicefarm', 'foo']
43+
assert self.completion_index.subcommands == [
44+
'create-device-pool', 'bar']
45+
assert self.completion_index.global_opts == [
46+
'--debug', '--endpoint-url']
47+
assert self.completion_index.args_opts == set([
48+
'--project-arn', '--name', '--baz'])

0 commit comments

Comments
 (0)