mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-05 08:51:20 +00:00
* Added basic openpyxl * Add screener checks to confirm that preset is correct (#580) * refactor screener finviz_view to view and model * Add checks for defined screener preset * Feature/fraud indicators (#581) * Fixed glitch reading AlphaVantage API key * Bug fix * Added mscore metric * Refactored code, added error handling * Updated reademe.md * Figuring out pre-commit * Figuring out pre-commit * Improved formating and code * Added Zscore * Formatted code Co-authored-by: Colin Delahunty <colindelahunty@Colins-Air.attlocal.net> * Reformated tests and started writing FA * Removed excel analytics * Figured out testing with input and print * Figured out testing with input and print * Added av_view tests * Added av_view tests * Added main_helper tests * Fixed Poetry * Added main helper tests * Expanded pycoingecko_view * Fixed ETF model * Added coinpaprika view tests * Added optimizer view tests * Updated tests Co-authored-by: Colin Delahunty <colindelahunty@Colins-Air.attlocal.net> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: Colin Delahunty <colindelahunty@Colins-MacBook-Air.local>
31 lines
812 B
Python
31 lines
812 B
Python
""" fundamental_analysis/financial_modeling_prep/fmp_view.py tests """
|
|
# Not testing these tests further. I do not have a fmp key
|
|
from contextlib import contextmanager
|
|
import unittest
|
|
import io
|
|
import sys
|
|
|
|
# pylint: disable=unused-import
|
|
from gamestonk_terminal.stocks.fundamental_analysis.financial_modeling_prep import (
|
|
fmp_view,
|
|
)
|
|
|
|
|
|
@contextmanager
|
|
def replace_stdin(target):
|
|
orig = sys.stdin
|
|
sys.stdin = target
|
|
yield
|
|
sys.stdin = orig
|
|
|
|
|
|
class TestFMPView(unittest.TestCase):
|
|
def test_fmp_valinvest_score(self):
|
|
capturedOutput = io.StringIO()
|
|
sys.stdout = capturedOutput
|
|
fmp_view.valinvest_score([], "GME")
|
|
sys.stdout = sys.__stdout__
|
|
capt = capturedOutput.getvalue()
|
|
print(capt)
|
|
self.assertIn("Ticker should be a NASDAQ", capt)
|