示例#1
0
 def test_Book_json_default(self):
     with pytest.raises(ValueError):
         get_deep_book()
示例#2
0
    def test_Book_json_syms(self):
        js = get_deep_book("AAPL")
        js2 = get_deep_book(["AAPL", "TSLA"])

        assert isinstance(js, dict) and len(js) == 1
        assert isinstance(js2, dict) and len(js2) == 2
示例#3
0
 def test_Book_too_many_symbols(self):
     with pytest.raises(ValueError):
         get_deep_book(self.bad)