@@ -2875,6 +2875,27 @@ async def test_list_relations_unauthorized(self, mock_request):
28752875 mock_request .assert_called ()
28762876 await api_client .close ()
28772877
2878+ @patch .object (rest .RESTClientObject , "request" )
2879+ async def test_list_relations_errored (self , mock_request ):
2880+ """Test case for list relations with undefined exception"""
2881+
2882+ mock_request .side_effect = ValueError ()
2883+ configuration = self .configuration
2884+ configuration .store_id = store_id
2885+ async with OpenFgaClient (configuration ) as api_client :
2886+ with self .assertRaises (ValueError ):
2887+ await api_client .list_relations (
2888+ body = ClientListRelationsRequest (
2889+ user = "user:81684243-9356-4421-8fbf-a4f8d36aa31b" ,
2890+ relations = ["reader" , "owner" , "viewer" ],
2891+ object = "document:2021-budget" ,
2892+ ),
2893+ options = {"authorization_model_id" : "01GXSA8YR785C4FYS3C0RTG7B1" },
2894+ )
2895+
2896+ mock_request .assert_called ()
2897+ await api_client .close ()
2898+
28782899 @patch .object (rest .RESTClientObject , "request" )
28792900 async def test_list_users (self , mock_request ):
28802901 """
0 commit comments