MCPcopy Index your code
hub / github.com/dbcli/pgcli / step_run_cli_using_arg

Function step_run_cli_using_arg

tests/features/steps/basic_commands.py:48–65  ·  view source on GitHub ↗
(context, arg)

Source from the content-addressed store, hash-verified

46
47@when("we launch dbcli using {arg}")
48def step_run_cli_using_arg(context, arg):
49 prompt_check = False
50 currentdb = None
51 if arg == "--username":
52 arg = "--username={}".format(context.conf["user"])
53 if arg == "--user":
54 arg = "--user={}".format(context.conf["user"])
55 if arg == "--port":
56 arg = "--port={}".format(context.conf["port"])
57 if arg == "--password":
58 arg = "--password"
59 prompt_check = False
60 # This uses the mock_pg_service.conf file in fixtures folder.
61 if arg == "dsn_password":
62 arg = "service=mock_postgres --password"
63 prompt_check = False
64 currentdb = "postgres"
65 wrappers.run_cli(context, run_args=[arg], prompt_check=prompt_check, currentdb=currentdb)
66
67
68@when("we wait for prompt")

Callers

nothing calls this directly

Calls 1

run_cliMethod · 0.80

Tested by

no test coverage detected