diff --git a/nailgun/entity_mixins.py b/nailgun/entity_mixins.py index 60b630a3..d7a56c26 100644 --- a/nailgun/entity_mixins.py +++ b/nailgun/entity_mixins.py @@ -1456,7 +1456,7 @@ def to_json_serializable(obj): if isinstance(obj, dict): return {k: to_json_serializable(v) for k, v in obj.items()} - elif isinstance(obj, (list, tuple)): + elif isinstance(obj, list | tuple): return [to_json_serializable(v) for v in obj] elif isinstance(obj, datetime): return obj.strftime('%Y-%m-%d %H:%M:%S') diff --git a/tests/test_client.py b/tests/test_client.py index d5557afc..0de36914 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,10 +1,9 @@ """Unit tests for :mod:`nailgun.client`.""" import inspect -from unittest import mock -from unittest import TestCase +from unittest import TestCase, mock -import requests from fauxfactory import gen_alpha +import requests from nailgun import client