File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ class ErrorCode(str, Enum):
88 INACTIVE_USER = "inactive_user"
99 HTTPS_ACCESS_RESTRICTED = "https_access_restricted"
1010 INVALID_API_FUNCTION = "invalid_api_function"
11- NOT_FOUND = "404_not_found"
11+ VALUE_6 = "404_not_found"
12+ NOT_FOUND_ERROR = "not_found_error"
1213 USAGE_LIMIT_REACHED = "usage_limit_reached"
1314 RATE_LIMIT_REACHED = "rate_limit_reached"
1415 INTERNAL_ERROR = "internal_error"
Original file line number Diff line number Diff line change 1010 description = "Inofficial Marketstack OpenAPI Python client" ,
1111 long_description = long_description ,
1212 long_description_content_type = "text/markdown" ,
13- version = "0.6.1 " ,
13+ version = "0.6.2 " ,
1414 url = "https://github.com/mreiche/marketstack-python" ,
1515 author = "Mike Reiche" ,
1616 packages = find_packages (),
Original file line number Diff line number Diff line change 22
33
44def test_error_codes ():
5- assert ErrorCode .NOT_FOUND .value == "404_not_found "
5+ assert ErrorCode .NOT_FOUND_ERROR .value == "not_found_error "
66
77
88def test_interval ():
Original file line number Diff line number Diff line change 1313 tickers ,
1414)
1515from marketstack .client import Client
16- from marketstack .models import ErrorResponse
16+ from marketstack .models import ErrorResponse , ErrorCode
1717from tests .setup import create_client , this_january , day_format
1818
1919client : Client
@@ -47,6 +47,16 @@ def test_ticker_symbol():
4747 assert response .symbol == "AAPL"
4848
4949
50+ def test_ticker_symbol_not_found ():
51+ response = ticker_symbol .sync (
52+ symbol = "AYBABTO" ,
53+ client = client ,
54+ access_key = os .getenv ("MARKETSTACK_API_KEY" ),
55+ )
56+ assert isinstance (response , ErrorResponse ) is True
57+ assert response .error .code == ErrorCode .NOT_FOUND_ERROR
58+
59+
5060def test_ticker_symbol_dividends ():
5161 response = ticker_symbol_dividends .sync (
5262 symbol = "AAPL" ,
You can’t perform that action at this time.
0 commit comments