mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
* adds os menu * remove tests * fixed tests * fixed date in sh * updated alt controller tests * updated api fecthing/handling * lint * updated website folder name and tests * alt tests * tests * tests * keys for github * updated tests Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt> Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
53 lines
1.4 KiB
Python
53 lines
1.4 KiB
Python
# IMPORTATION STANDARD
|
|
|
|
# IMPORTATION THIRDPARTY
|
|
import pytest
|
|
|
|
# IMPORTATION INTERNAL
|
|
from openbb_terminal.alternative.oss import github_view
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def vcr_config():
|
|
return {
|
|
"filter_headers": [
|
|
("User-Agent", None),
|
|
("Authorization", "MOCK_AUTHORIZATION"),
|
|
],
|
|
}
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.record_stdout
|
|
def test_display_star_history(mocker):
|
|
# MOCK EXPORT_DATA
|
|
mocker.patch(target="openbb_terminal.alternative.oss.github_view.export_data")
|
|
|
|
# MOCK VISUALIZE_OUTPUT
|
|
mocker.patch(target="openbb_terminal.helper_classes.TerminalStyle.visualize_output")
|
|
|
|
github_view.display_star_history(repo="openbb-finance/openbbterminal")
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.record_stdout
|
|
def test_display_top_repos(mocker):
|
|
# MOCK EXPORT_DATA
|
|
mocker.patch(target="openbb_terminal.alternative.oss.github_view.export_data")
|
|
|
|
# MOCK VISUALIZE_OUTPUT
|
|
mocker.patch(target="openbb_terminal.helper_classes.TerminalStyle.visualize_output")
|
|
|
|
github_view.display_top_repos(sortby="stars", categories="", limit=10)
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.record_stdout
|
|
def test_display_repo_summary(mocker):
|
|
# MOCK EXPORT_DATA
|
|
mocker.patch(target="openbb_terminal.alternative.oss.github_view.export_data")
|
|
|
|
github_view.display_repo_summary(
|
|
repo="openbb-finance/openbbterminal",
|
|
)
|