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>
52 lines
1.0 KiB
Python
52 lines
1.0 KiB
Python
# IMPORTATION STANDARD
|
|
|
|
# IMPORTATION THIRDPARTY
|
|
import pytest
|
|
|
|
# IMPORTATION INTERNAL
|
|
from openbb_terminal.alternative.oss import github_model
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def vcr_config():
|
|
return {
|
|
"filter_headers": [
|
|
("User-Agent", None),
|
|
("Authorization", "MOCK_AUTHORIZATION"),
|
|
],
|
|
}
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.parametrize(
|
|
"repo",
|
|
[("openbb-finance/openbbterminal")],
|
|
)
|
|
def test_get_repo_summary(repo, recorder):
|
|
df = github_model.get_repo_summary(
|
|
repo=repo,
|
|
)
|
|
recorder.capture(df)
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.parametrize(
|
|
"repo",
|
|
[("openbb-finance/openbbterminal")],
|
|
)
|
|
def test_get_stars_history(repo, recorder):
|
|
df = github_model.get_stars_history(
|
|
repo=repo,
|
|
)
|
|
recorder.capture(df)
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.parametrize(
|
|
"sortby,top,categories",
|
|
[("stars", 10, "")],
|
|
)
|
|
def test_get_top_repos(sortby, top, categories, recorder):
|
|
df = github_model.get_top_repos(sortby, top, categories)
|
|
recorder.capture(df)
|