MCPcopy Create free account
hub / github.com/Drakkar-Software/OctoBot / deferred_profile_config

Function deferred_profile_config

tests/unit_tests/test_cli.py:50–75  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

48
49@pytest.fixture
50def deferred_profile_config(tmp_path):
51 profiles_path = tmp_path / commons_constants.PROFILES_FOLDER
52 default_profile_path = profiles_path / commons_constants.DEFAULT_PROFILE
53 default_profile_path.mkdir(parents=True)
54 _write_minimal_profile(default_profile_path)
55
56 config_file = tmp_path / commons_constants.CONFIG_FILE
57 json_util.safe_dump(
58 {
59 backtesting_constants.CONFIG_BACKTESTING: {
60 backtesting_constants.CONFIG_BACKTESTING_DATA_FILES: [],
61 },
62 commons_constants.CONFIG_EXCHANGES: {},
63 commons_constants.CONFIG_PROFILE: commons_constants.DEFAULT_PROFILE,
64 commons_constants.CONFIG_ACCEPTED_TERMS: True,
65 commons_constants.CONFIG_DISTRIBUTION: commons_constants.DEFAULT_DISTRIBUTION,
66 },
67 str(config_file),
68 )
69
70 return configuration.Configuration(
71 str(config_file),
72 str(profiles_path),
73 octobot_constants.CONFIG_FILE_SCHEMA,
74 octobot_constants.PROFILE_FILE_SCHEMA,
75 )
76
77
78def _start_octobot_cli_args(**overrides):

Callers

nothing calls this directly

Calls 1

_write_minimal_profileFunction · 0.85

Tested by

no test coverage detected