Skip to content

Commit 4863b63

Browse files
committed
Fix test failing due to lack of whitespace in new json output
1 parent 370e53e commit 4863b63

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/tests

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/tests/test_manual.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import datetime
1717
import base64
1818
import os
19+
import json
1920

2021
import openapi_client
2122
from openapi_client.api.query_api import QueryApi # noqa: E501
@@ -154,9 +155,9 @@ def test_from_to_methods(self):
154155
assert pet.category is not None
155156
self.assertEqual(pet.category.id, 1)
156157
# test to_json
157-
self.assertEqual(pet.to_json(),
158-
'{"id": 1, "name": "test name", "category": {"id": 1, "name": "dog"}, "photoUrls": ['
159-
'"string"], "tags": [{"id": 1, "name": "None"}], "status": "available"}')
158+
self.assertEqual(json.loads(pet.to_json()),
159+
{"id": 1, "name": "test name", "category": {"id": 1, "name": "dog"}, "photoUrls": ["string"],
160+
"tags": [{"id": 1, "name": "None"}], "status": "available"})
160161

161162
# test to_dict
162163
self.assertEqual(pet.to_dict(),

0 commit comments

Comments
 (0)