@@ -58,7 +58,7 @@ async def test_returns_40x_if_not_authenticated(
5858 self , test_db , session : AsyncSession , client : AsyncClient
5959 ):
6060 response = await client .post ("/api/fleets/list" )
61- assert response .status_code == 403
61+ assert response .status_code in [ 401 , 403 ]
6262
6363 @pytest .mark .asyncio
6464 @pytest .mark .parametrize ("test_db" , ["sqlite" , "postgres" ], indirect = True )
@@ -147,7 +147,7 @@ async def test_returns_40x_if_not_authenticated(
147147 self , test_db , session : AsyncSession , client : AsyncClient
148148 ):
149149 response = await client .post ("/api/project/main/fleets/list" )
150- assert response .status_code == 403
150+ assert response .status_code in [ 401 , 403 ]
151151
152152 @pytest .mark .asyncio
153153 @pytest .mark .parametrize ("test_db" , ["sqlite" , "postgres" ], indirect = True )
@@ -188,7 +188,7 @@ async def test_returns_40x_if_not_authenticated(
188188 self , test_db , session : AsyncSession , client : AsyncClient
189189 ):
190190 response = await client .post ("/api/project/main/fleets/get" )
191- assert response .status_code == 403
191+ assert response .status_code in [ 401 , 403 ]
192192
193193 @pytest .mark .asyncio
194194 @pytest .mark .parametrize ("test_db" , ["sqlite" , "postgres" ], indirect = True )
@@ -309,7 +309,7 @@ async def test_returns_40x_if_not_authenticated(
309309 self , test_db , session : AsyncSession , client : AsyncClient
310310 ):
311311 response = await client .post ("/api/project/main/fleets/apply" )
312- assert response .status_code == 403
312+ assert response .status_code in [ 401 , 403 ]
313313
314314 @pytest .mark .asyncio
315315 @pytest .mark .parametrize ("test_db" , ["sqlite" , "postgres" ], indirect = True )
@@ -829,7 +829,7 @@ async def test_returns_40x_if_not_authenticated(
829829 self , test_db , session : AsyncSession , client : AsyncClient
830830 ):
831831 response = await client .post ("/api/project/main/fleets/delete" )
832- assert response .status_code == 403
832+ assert response .status_code in [ 401 , 403 ]
833833
834834 @pytest .mark .asyncio
835835 @pytest .mark .parametrize ("test_db" , ["sqlite" , "postgres" ], indirect = True )
@@ -942,7 +942,7 @@ async def test_returns_40x_if_not_authenticated(
942942 self , test_db , session : AsyncSession , client : AsyncClient
943943 ):
944944 response = await client .post ("/api/project/main/fleets/delete_instances" )
945- assert response .status_code == 403
945+ assert response .status_code in [ 401 , 403 ]
946946
947947 @pytest .mark .asyncio
948948 @pytest .mark .parametrize ("test_db" , ["sqlite" , "postgres" ], indirect = True )
@@ -1036,7 +1036,7 @@ async def test_returns_40x_if_not_authenticated(
10361036 self , test_db , session : AsyncSession , client : AsyncClient
10371037 ):
10381038 response = await client .post ("/api/project/main/fleets/get_plan" )
1039- assert response .status_code == 403
1039+ assert response .status_code in [ 401 , 403 ]
10401040
10411041 @pytest .mark .asyncio
10421042 @pytest .mark .parametrize ("test_db" , ["sqlite" , "postgres" ], indirect = True )
0 commit comments