mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
* Added tests ReadMe * Added warning * Moved testing docs * Fixed formatting * Added a CF tie-out warning and handling for negative firm value * Added treasury API * Updated t-bill from API * Finished better risk understanding * Finished better risk understanding * Requested changes * Updated * Updated filename Co-authored-by: Colin Delahunty <colindelahunty@colins-air.attlocal.net> Co-authored-by: Colin Delahunty <colindelahunty@Colins-MacBook-Air.local>
32 lines
784 B
Python
32 lines
784 B
Python
""" fundamental_analysis/financial_modeling_prep/fmp_view.py tests """
|
|
import sys
|
|
import unittest
|
|
|
|
# Not testing these tests further. I do not have a fmp key
|
|
from contextlib import contextmanager
|
|
|
|
import vcr
|
|
|
|
from gamestonk_terminal.stocks.fundamental_analysis.financial_modeling_prep import (
|
|
fmp_view,
|
|
)
|
|
from tests.helpers import check_print
|
|
|
|
|
|
@contextmanager
|
|
def replace_stdin(target):
|
|
orig = sys.stdin
|
|
sys.stdin = target
|
|
yield
|
|
sys.stdin = orig
|
|
|
|
|
|
class TestFMPView(unittest.TestCase):
|
|
@check_print(assert_in="Ticker should be a NASDAQ")
|
|
@vcr.use_cassette(
|
|
"tests/cassettes/test_fa/test_fa_fmp/test_fmp_valinvest.yaml",
|
|
record_mode="new_episodes",
|
|
)
|
|
def test_fmp_valinvest_score(self):
|
|
fmp_view.valinvest_score([], "GME")
|