summaryrefslogtreecommitdiff
path: root/test/lib/ansible_test/_internal/cli/commands/integration/network.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/ansible_test/_internal/cli/commands/integration/network.py')
-rw-r--r--test/lib/ansible_test/_internal/cli/commands/integration/network.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/lib/ansible_test/_internal/cli/commands/integration/network.py b/test/lib/ansible_test/_internal/cli/commands/integration/network.py
index d070afda9b..86729195b0 100644
--- a/test/lib/ansible_test/_internal/cli/commands/integration/network.py
+++ b/test/lib/ansible_test/_internal/cli/commands/integration/network.py
@@ -28,6 +28,10 @@ from ...environments import (
add_environments,
)
+from ...completers import (
+ register_completer,
+)
+
def do_network_integration(
subparsers,
@@ -51,16 +55,16 @@ def do_network_integration(
add_integration_common(network_integration)
- network_integration.add_argument(
+ register_completer(network_integration.add_argument(
'--testcase',
metavar='TESTCASE',
help='limit a test to a specified testcase',
- ).completer = complete_network_testcase
+ ), complete_network_testcase)
add_environments(parser, completer, ControllerMode.DELEGATED, TargetMode.NETWORK_INTEGRATION) # network-integration
-def complete_network_testcase(prefix, parsed_args, **_): # type: (str, argparse.Namespace, ...) -> t.List[str]
+def complete_network_testcase(prefix: str, parsed_args: argparse.Namespace, **_) -> t.List[str]:
"""Return a list of test cases matching the given prefix if only one target was parsed from the command line, otherwise return an empty list."""
testcases = []