diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 00000000000..ca073aeb742 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,2 @@ +def pytest_configure(config): + config.addinivalue_line("markers", "e2e: mark as end-to-end test.") \ No newline at end of file diff --git a/tests/test_gamestonk_terminal.py b/tests/test_gamestonk_terminal.py new file mode 100644 index 00000000000..d45d4ffdfe8 --- /dev/null +++ b/tests/test_gamestonk_terminal.py @@ -0,0 +1,21 @@ +from unittest.mock import patch + +import pandas as pd +import pytest + +from gamestonk_terminal import load + +@pytest.mark.e2e +def test_load_command(): + + test_stock = 'TSLA' + test_start = '2020-06-04' + + with patch('sys.stdout.write') as mock_out: + result = load(['-t', test_stock, '-s', test_start], '', '', '', '') + + args = mock_out.call_args_list[0][0] + + assert result[0] == test_stock + assert test_stock in args[0] + assert test_start in args[0]