Example #1
0
    def test_last_pandas(self):
        df = get_market_last(output_format='pandas')
        df2 = get_market_last("AAPL", output_format='pandas')
        df3 = get_market_last(["AAPL", "TSLA"], output_format='pandas')

        assert isinstance(df, DataFrame)
        assert isinstance(df2, DataFrame)
        assert isinstance(df3, DataFrame)
Example #2
0
 def test_last_too_many_symbols(self):
     with pytest.raises(ValueError):
         get_market_last(self.bad)
Example #3
0
    def test_last_json_syms(self):
        ls = get_market_last("AAPL")
        ls2 = get_market_last(["AAPL", "TSLA"])

        assert isinstance(ls, list) and len(ls) == 1
        assert isinstance(ls2, list) and len(ls2) == 2
Example #4
0
    def test_last_json_default(self):
        ls = get_market_last()

        assert isinstance(ls, list) and len(ls) > 7500