fix unit tests (#2562)

Co-authored-by: atarashansky <atarashansky@CZIMACOS3990.local>
This commit is contained in:
atarashansky
2022-08-25 08:02:58 -07:00
committed by GitHub
parent a9044b01df
commit ff5da77372
2 changed files with 2 additions and 3 deletions

View File

@@ -98,8 +98,7 @@ def custom_format_warning(msg, *args, **kwargs):
def jsonify_strict(data):
return json.dumps(data, cls=StrictJSONEncoder, allow_nan=False)
return StrictJSONEncoder().encode(data)
def import_plugins(plugin_module):
"""

View File

@@ -54,5 +54,5 @@ class TestJsonifyStrict(unittest.TestCase):
# the actual test!
self.assertEqual(
jsonify_strict(values),
'{"floating": [100.0, 101.0, 102.0], "integer": [0, 1, 2, 3, 4, 5, 6, 7]}',
'{"integer": [0, 1, 2, 3, 4, 5, 6, 7], "floating": [100.0, 101.0, 102.0]}',
)