Skip to content

Commit

Permalink
refactor: handle changes to CheckError type
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed Dec 13, 2024
1 parent 70ac189 commit 79509c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions openfga_sdk/models/check_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class CheckError:
}

attribute_map = {
"input_error": "inputError",
"internal_error": "internalError",
"input_error": "input_error",
"internal_error": "internal_error",
"message": "message",
}

Expand Down
2 changes: 1 addition & 1 deletion test/client/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2275,7 +2275,7 @@ async def test_batch_check_multiple_request(self, mock_request, mock_uuid):
"result": {
"fake-uuid": {
"error": {
"inputError": "validation_error",
"input_error": "validation_error",
"message": "type 'doc' not found"
}
}
Expand Down
3 changes: 1 addition & 2 deletions test/sync/client/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2228,7 +2228,6 @@ def test_batch_check_single_request(self, mock_request):
self.assertTrue(api_response.result[0].allowed)
self.assertEqual(api_response.result[0].correlation_id, "1")
self.assertEqual(api_response.result[0].request, body.checks[0])

# Make sure the API was called with the right data
mock_request.assert_any_call(
"POST",
Expand Down Expand Up @@ -2279,7 +2278,7 @@ def test_batch_check_multiple_request(self, mock_request, mock_uuid):
"result": {
"fake-uuid": {
"error": {
"inputError": "validation_error",
"input_error": "validation_error",
"message": "type 'doc' not found"
}
}
Expand Down

0 comments on commit 79509c1

Please sign in to comment.