Files
OpenBB/tests/openbb_terminal/alternative/oss/test_github_model.py
jose-donato 01391c2564 New Open Source menu (#1603)
* 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>
2022-04-04 19:08:50 +03:00

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)