def test_get_lookup(): expected = { "securities": { "security": { "symbol": "GOOGL", "exchange": "Q", "type": "stock", "description": "Alphabet Inc", } } } t = Tradier(access_token=ACCESS_TOKEN) result = t.get_lookup("googl") assert result == expected
def test_fake_access_token(): t = Tradier(access_token="Not a real access token") with pytest.raises(AssertionError): t.get_lookup("goog")