mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-31 14:31:20 +00:00
* update * init * req * fix * req * meh * updates * syspath * update * local plotly, and scope logic * refactor * oops typo * plot dpi fixes * fix tests * fix * poetry update, reqs * some adjustments * added plot settings for scat/options Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com> Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
35 lines
728 B
Python
35 lines
728 B
Python
import pytest
|
|
|
|
try:
|
|
from bots.stocks.options.itm import itm_command
|
|
except ImportError:
|
|
pytest.skip(allow_module_level=True)
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def vcr_config():
|
|
return {
|
|
"filter_headers": [("User-Agent", None)],
|
|
"filter_query_parameters": [
|
|
("period1", "MOCK_PERIOD_1"),
|
|
("period2", "MOCK_PERIOD_2"),
|
|
("date", "MOCK_DATE"),
|
|
],
|
|
}
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.bots
|
|
def test_itm_command(recorder):
|
|
value = itm_command("TSLA")
|
|
value["imagefile"] = value["imagefile"][-4:]
|
|
|
|
recorder.capture(value)
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.bots
|
|
def test_itm_command_invalid():
|
|
with pytest.raises(Exception):
|
|
itm_command("")
|