mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
@@ -6,6 +6,7 @@ import pandas as pd
|
||||
import pytest
|
||||
|
||||
from openbb_terminal import keys_model
|
||||
from openbb_terminal.core.session import env_handler
|
||||
from openbb_terminal.core.session.current_user import (
|
||||
PreferencesModel,
|
||||
copy_user,
|
||||
@@ -52,7 +53,7 @@ def set_naive_environment(var_name_list: List[str]) -> None:
|
||||
tmp_env.unlink(missing_ok=True)
|
||||
|
||||
# Set new temporary .env
|
||||
keys_model.SETTINGS_ENV_FILE = tmp_env
|
||||
env_handler.SETTINGS_ENV_FILE = tmp_env
|
||||
|
||||
|
||||
# Alphavantage api is working with any key you pass, so expected is 1 with dummy keys
|
||||
|
||||
@@ -26,6 +26,9 @@ def controller(mocker):
|
||||
mocker.patch(
|
||||
target="openbb_terminal.settings_controller.set_preference",
|
||||
)
|
||||
mocker.patch(
|
||||
target="openbb_terminal.settings_controller.write_to_dotenv",
|
||||
)
|
||||
|
||||
mocker.patch("openbb_terminal.settings_controller.session", True)
|
||||
return SettingsController()
|
||||
|
||||
Reference in New Issue
Block a user