@@ -1457,9 +1457,16 @@ async def test_check(self, mock_request):
14571457 response_body = '{"allowed": true, "resolution": "1234"}'
14581458 mock_request .return_value = mock_response (response_body , 200 )
14591459 body = ClientCheckRequest (
1460- object = "document:2021-budget" ,
1461- relation = "reader" ,
14621460 user = "user:81684243-9356-4421-8fbf-a4f8d36aa31b" ,
1461+ relation = "reader" ,
1462+ object = "document:budget" ,
1463+ contextual_tuples = [
1464+ ClientTuple (
1465+ user = "user:81684243-9356-4421-8fbf-a4f8d36aa31b" ,
1466+ relation = "writer" ,
1467+ object = "document:budget" ,
1468+ ),
1469+ ],
14631470 )
14641471 configuration = self .configuration
14651472 configuration .store_id = store_id
@@ -1477,8 +1484,9 @@ async def test_check(self, mock_request):
14771484 headers = ANY ,
14781485 query_params = [],
14791486 post_params = [],
1480- body = {"tuple_key" : {"object" : "document:2021-budget" ,
1481- "relation" : "reader" , "user" : "user:81684243-9356-4421-8fbf-a4f8d36aa31b" }, "authorization_model_id" : "01GXSA8YR785C4FYS3C0RTG7B1" },
1487+ body = {"tuple_key" : {"user" : "user:81684243-9356-4421-8fbf-a4f8d36aa31b" , "relation" : "reader" , "object" : "document:budget" },
1488+ "contextual_tuples" : {"tuple_keys" : [{"user" : "user:81684243-9356-4421-8fbf-a4f8d36aa31b" , "relation" : "writer" , "object" : "document:budget" }]},
1489+ "authorization_model_id" : "01GXSA8YR785C4FYS3C0RTG7B1" },
14821490 _preload_content = ANY ,
14831491 _request_timeout = None
14841492 )
0 commit comments