MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / test_create

Method test_create

tests/test_cli.py:64–79  ·  view source on GitHub ↗
(self, name, extra_opts, inputs)

Source from the content-addressed store, hash-verified

62 token="token", client=None, solver=None)),
63 ])
64 def test_create(self, name, extra_opts, inputs):
65 config_file = 'path/to/dwave.conf'
66 profile = 'profile'
67
68 runner = CliRunner()
69 with runner.isolated_filesystem():
70 result = runner.invoke(cli, [
71 'config', 'create', '--config-file', config_file, '--profile', profile
72 ] + extra_opts, input=''.join(f"{'' if v is None else v}\n" for v in inputs.values()))
73 self.assertEqual(result.exit_code, 0)
74
75 # load and verify config
76 with isolated_environ(remove_dwave=True):
77 config = load_config(config_file, profile=profile)
78 for var, val in inputs.items():
79 self.assertEqual(config.get(var), val)
80
81 @parameterized.expand([
82 ("simple", [], dict(token="token")),

Callers

nothing calls this directly

Calls 3

isolated_environClass · 0.90
load_configFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected