diff --git a/lower-constraints.txt b/lower-constraints.txt index a3202e88..c826905a 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -59,7 +59,7 @@ oslo.context==2.20.0 oslo.i18n==3.20.0 oslo.log==3.37.0 oslo.policy==1.34.0 -oslo.serialization==2.25.0 +oslo.serialization==2.18.0 oslo.utils==3.36.0 osprofiler==2.3.0 packaging==17.1 @@ -80,7 +80,7 @@ python-cinderclient==3.5.0 python-dateutil==2.7.0 python-glanceclient==2.9.1 python-keystoneclient==3.15.0 -python-magnumclient==2.6.0 +python-magnumclient==2.11.0 python-mimeparse==1.6.0 python-neutronclient==6.7.0 python-novaclient==10.1.0 diff --git a/magnum_ui/test/api_tests/test_rest_api.py b/magnum_ui/test/api_tests/test_rest_api.py index 13191787..e4c9a7a4 100644 --- a/magnum_ui/test/api_tests/test_rest_api.py +++ b/magnum_ui/test/api_tests/test_rest_api.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import mock +from oslo_serialization import jsonutils + from magnum_ui.api.rest import magnum from magnum_ui.test import test_data from openstack_dashboard.test import helpers as test @@ -42,7 +43,7 @@ class MagnumRestTestCase(test.TestCase): def test_cluster_template_create(self, client): test_cluster_templates = mock_resource(TEST.cluster_templates.list()) test_cluster_template = test_cluster_templates[0] - test_body = json.dumps(test_cluster_template.to_dict()) + test_body = jsonutils.dumps(test_cluster_template.to_dict()) request = self.mock_rest_request(body=test_body) client.cluster_template_create.return_value = test_cluster_template response = magnum.ClusterTemplates().post(request) @@ -83,7 +84,7 @@ class MagnumRestTestCase(test.TestCase): def test_cluster_create(self, client): test_clusters = mock_resource(TEST.clusters.list()) test_cluster = test_clusters[0] - test_body = json.dumps(test_cluster.to_dict()) + test_body = jsonutils.dumps(test_cluster.to_dict()) request = self.mock_rest_request(body=test_body) client.cluster_create.return_value = test_cluster response = magnum.Clusters().post(request) @@ -111,7 +112,7 @@ class MagnumRestTestCase(test.TestCase): def test_certificate_create(self, client): test_certificates = mock_resource(TEST.certificates.list()) test_certificate = test_certificates[0] - test_body = json.dumps(test_certificate.to_dict()) + test_body = jsonutils.dumps(test_certificate.to_dict()) request = self.mock_rest_request(body=test_body) test_res_list = mock_resource(TEST.certificate_res_list.list()) @@ -119,7 +120,7 @@ class MagnumRestTestCase(test.TestCase): client.certificate_create.return_value = test_res response = magnum.Certificates().post(request) - res_body = json.loads(response.content.decode('utf-8')) + res_body = jsonutils.loads(response.content.decode('utf-8')) self.assertStatusCode(response, 201) self.assertEqual(res_body['pem'], test_res.to_dict()['pem']) diff --git a/requirements.txt b/requirements.txt index f58bc7cb..87377a96 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ # # PBR should always appear first pbr!=2.1.0,>=2.0.0 # Apache-2.0 -python-magnumclient>=2.6.0 # Apache-2.0 +python-magnumclient>=2.11.0 # Apache-2.0 horizon>=15.0.0.0b1 # Apache-2.0