File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ async def test_account_no_user(
3838 """Connection properly reacts to account that doesn't have
3939 a user attached to it."""
4040
41- with raises (AccountNotFoundOrNoAccessError ) as exc_info :
41+ with raises (( AccountNotFoundOrNoAccessError , FireboltStructuredError ) ) as exc_info :
4242 async with await connect (
4343 database = database_name ,
4444 auth = auth_no_user ,
@@ -50,8 +50,12 @@ async def test_account_no_user(
5050 ) as connection :
5151 await connection .cursor ().execute ("show tables" )
5252
53- assert f"'{ account_name } ' does not exist" in str (
54- exc_info .value
53+ assert str (exc_info .value ).startswith (
54+ f"Account '{ account_name } ' does not exist"
55+ ) or (
56+ # Caching on the backend may cause this error instead
57+ f"Database '{ database_name } ' does not exist or not authorized."
58+ in str (exc_info .value )
5559 ), "Invalid account error message."
5660
5761
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def test_account_no_user(
3636 api_endpoint : str ,
3737) -> None :
3838 """Connection properly reacts to invalid account error."""
39- with raises (AccountNotFoundOrNoAccessError ) as exc_info :
39+ with raises (( AccountNotFoundOrNoAccessError , FireboltStructuredError ) ) as exc_info :
4040 with connect (
4141 database = database_name ,
4242 auth = auth_no_user ,
@@ -50,6 +50,10 @@ def test_account_no_user(
5050
5151 assert str (exc_info .value ).startswith (
5252 f"Account '{ account_name } ' does not exist"
53+ ) or (
54+ # Caching on the backend may cause this error instead
55+ f"Database '{ database_name } ' does not exist or not authorized."
56+ in str (exc_info .value )
5357 ), "Invalid account error message."
5458
5559
You can’t perform that action at this time.
0 commit comments