def test_Book_json_default(self): with pytest.raises(ValueError): get_deep_book()
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
def test_Book_too_many_symbols(self): with pytest.raises(ValueError): get_deep_book(self.bad)