Files
OpenBB/tests/test_fa/test_fa_fmp_view.py
colin99d ce457314a0 Improved Discount Rate Calculation for DCF (#697)
* 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>
2021-08-22 01:23:44 +01:00

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")