mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
* Added openbb_terminal/logger tests * Added tests for path_tracking * Just in case lol * Finished test_directories * Added more tests * Fixed flake8 error * Fixed flake8 error * Coverage for test_expired_files * Added handling for no boto3 * Added test mock * Added test mock * Added fix * Test fix * Fix for windows * Added int * More tests * Added fixes * Fixed black issues * Tests : update fixture examples * Tests : core/log/generation * Core : log/generation * replaced conftest delete with temp_path * Fixed mocks * refactored get settings to use tmp_path * reverted codespell * Making random faillign test linux only * Swapped to fixture * Fixed conftest * Logs collection : add docstring + clean lines * Tests : fix windows specific issue * Tests : skip unsound tests which changes logger state * Black * Linting Co-authored-by: Chavithra PARANA <chavithra@gmail.com> Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
32 lines
828 B
Python
32 lines
828 B
Python
import pytest
|
|
from openbb_terminal.core.log.generation.settings import (
|
|
Settings,
|
|
AppSettings,
|
|
AWSSettings,
|
|
LogSettings,
|
|
)
|
|
|
|
|
|
@pytest.fixture()
|
|
def settings(tmp_path):
|
|
settings_obj = Settings(
|
|
app_settings=AppSettings(
|
|
commit_hash="MOCK_COMMIT_HASH",
|
|
name="MOCK_NAME",
|
|
identifier="MOCK_IDENTIFIER",
|
|
session_id="MOCK_SESSION_ID",
|
|
),
|
|
aws_settings=AWSSettings(
|
|
aws_access_key_id="MOCK_AWS_ACCESS_KEY_ID",
|
|
aws_secret_access_key="MOCK_AWS_ACCESS_KEY", # pragma: allowlist secret
|
|
),
|
|
log_settings=LogSettings(
|
|
directory=tmp_path,
|
|
frequency="H",
|
|
handler_list="file",
|
|
rolling_clock=False,
|
|
verbosity=20,
|
|
),
|
|
)
|
|
return settings_obj
|