mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 21:12:16 +00:00
* Expanding bot tests * expanded tests * Added tests * Added stock test * Fix filepath * Attempted mock * Bots : test_run_telegram * Enhance tests * Fixed black * Expanded tests * Added fix * Ingore interactive files * Removed bot dependency installation from tests * Fix one black * Fixed black * Added init.py * Added pylint disables * Added skip Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
38 lines
865 B
Python
38 lines
865 B
Python
import pytest
|
|
|
|
try:
|
|
from bots.economy.performance import performance_command
|
|
except ImportError:
|
|
pytest.skip(allow_module_level=True)
|
|
|
|
|
|
@pytest.mark.bots
|
|
@pytest.mark.parametrize(
|
|
"group",
|
|
[
|
|
"sector",
|
|
"industry",
|
|
"basic_materials",
|
|
"communication_services",
|
|
"consumer_cyclical",
|
|
"consumer_defensive",
|
|
"energy",
|
|
"financial",
|
|
"healthcare",
|
|
"industrials",
|
|
"real_estate",
|
|
"technology",
|
|
"utilities",
|
|
"country",
|
|
"capitalization",
|
|
],
|
|
)
|
|
@pytest.mark.vcr
|
|
def test_performance_command(mocker, recorder, group):
|
|
mocker.patch("bots.helpers.uuid_get", return_value="1")
|
|
value = performance_command(group)
|
|
value["view"] = value["view"].__name__
|
|
value["embed"] = None
|
|
value["choices"] = None
|
|
recorder.capture(value)
|