Skip to content

Commit 4ea020f

Browse files
committed
tests (Account Balance): updated assertion to assert await instead of call with appropriate args.
1 parent e11a25a commit 4ea020f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/unit/account_balance/test_account_balance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ async def test_async_query_returns_acknowledgement(
270270
assert response.ResponseCode == response_data["ResponseCode"]
271271
assert response.ResponseDescription == response_data["ResponseDescription"]
272272

273-
mock_async_http_client.post.assert_called_once()
274-
args, kwargs = mock_async_http_client.post.call_args
273+
mock_async_http_client.post.assert_awaited_once()
274+
args, kwargs = mock_async_http_client.post.await_args
275275
assert args[0] == "/mpesa/accountbalance/v1/query"
276276
assert kwargs["headers"]["Authorization"] == "Bearer test_async_token"
277277
assert kwargs["headers"]["Content-Type"] == "application/json"

0 commit comments

Comments
 (0)