Skip to content

Commit

Permalink
suppress warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rcholic committed Dec 14, 2024
1 parent 2c2a00b commit b69b983
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def get_mock_response(


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_market_hours(httpx_mock: HTTPXMock) -> None:
market_hours_json = {
"start": "2022-04-14T09:30:00-04:00",
Expand Down Expand Up @@ -192,6 +193,7 @@ def test_parsing_order():


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_get_order(httpx_mock: HTTPXMock):
json_mock = get_mock_response()["single_order"]
mocked_token = mock_tokens()
Expand Down Expand Up @@ -244,6 +246,7 @@ async def test_get_order(httpx_mock: HTTPXMock):


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_place_order(httpx_mock: HTTPXMock):
mocked_token = mock_tokens()
if os.path.exists(Path(token_store.token_output_path)):
Expand Down Expand Up @@ -323,6 +326,7 @@ async def test_place_order(httpx_mock: HTTPXMock):


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_cancel_order(httpx_mock: HTTPXMock):
mocked_token = mock_tokens()
if os.path.exists(Path(token_store.token_output_path)):
Expand Down Expand Up @@ -361,6 +365,7 @@ async def test_cancel_order(httpx_mock: HTTPXMock):


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_get_order_by_id(httpx_mock: HTTPXMock):
json_mock = get_mock_response()["filled_order"]
mocked_token = mock_tokens()
Expand Down Expand Up @@ -405,6 +410,7 @@ async def test_get_order_by_id(httpx_mock: HTTPXMock):


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_get_single_account(httpx_mock: HTTPXMock):
json_mock = get_mock_response()["single_account"]
mocked_token = mock_tokens()
Expand Down Expand Up @@ -451,6 +457,7 @@ async def test_get_single_account(httpx_mock: HTTPXMock):


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_get_securities_account(httpx_mock: HTTPXMock):
json_mock = get_mock_response()["securities_account"] # single_account
mocked_token = mock_tokens()
Expand Down Expand Up @@ -501,6 +508,7 @@ async def test_get_securities_account(httpx_mock: HTTPXMock):


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_download_option_chain(httpx_mock: HTTPXMock):
mock_option_chain_resp = get_mock_response()
mocked_token = mock_tokens()
Expand Down Expand Up @@ -571,6 +579,7 @@ async def test_download_option_chain(httpx_mock: HTTPXMock):


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_get_option_expirations(httpx_mock: HTTPXMock):
mock_option_chain_resp = get_mock_response()
mocked_token = mock_tokens()
Expand Down Expand Up @@ -622,6 +631,7 @@ async def test_get_option_expirations(httpx_mock: HTTPXMock):


@pytest.mark.asyncio
@pytest.mark.httpx_mock(assert_all_requests_were_expected=False)
async def test_get_account_numbers(httpx_mock: HTTPXMock):
# Mock response for account numbers API
mock_data = get_mock_response()
Expand Down

0 comments on commit b69b983

Please sign in to comment.