@@ -45,7 +45,7 @@ async def test_auth_wrong_api_key(self):
4545 ably = await TestApp .get_ably_realtime (key = api_key )
4646 state_change = await ably .connection .once_async (ConnectionState .FAILED )
4747 assert ably .connection .error_reason == state_change .reason
48- assert state_change .reason .code == 40005
48+ assert state_change .reason .code == 40101
4949 assert state_change .reason .status_code == 400
5050 await ably .close ()
5151
@@ -63,7 +63,7 @@ async def test_auth_with_invalid_token_string(self):
6363 invalid_token = "Sdnurv_some_invalid_token_nkds9r7"
6464 ably = await TestApp .get_ably_realtime (token = invalid_token )
6565 state_change = await ably .connection .once_async (ConnectionState .FAILED )
66- assert state_change .reason .code == 40005
66+ assert state_change .reason .code == 40101
6767 assert state_change .reason .status_code == 400
6868 await ably .close ()
6969
@@ -81,7 +81,7 @@ async def test_auth_with_invalid_token_details(self):
8181 invalid_token_details = TokenDetails (token = "invalid-token" )
8282 ably = await TestApp .get_ably_realtime (token_details = invalid_token_details )
8383 state_change = await ably .connection .once_async (ConnectionState .FAILED )
84- assert state_change .reason .code == 40005
84+ assert state_change .reason .code == 40101
8585 assert state_change .reason .status_code == 400
8686 await ably .close ()
8787
@@ -133,7 +133,7 @@ async def callback(params):
133133
134134 ably = await TestApp .get_ably_realtime (auth_callback = callback )
135135 state_change = await ably .connection .once_async (ConnectionState .FAILED )
136- assert state_change .reason .code == 40005
136+ assert state_change .reason .code == 40101
137137 assert state_change .reason .status_code == 400
138138 await ably .close ()
139139
0 commit comments