diff options
author | 2019-08-20 10:01:12 +0000 | |
---|---|---|
committer | 2019-08-21 03:02:23 +0000 | |
commit | fbc00166dc021898a1a7dfb98672ec3bc28851b9 (patch) | |
tree | 789c60af42a259a5fb58753dc9e4485aea95db87 /windriver/titanium_cloud/extensions/tests/test_extensions.py | |
parent | 4c33dac9a6735b07c5e7e0d2f67baa2f5eaeed97 (diff) |
Update windriver plugin to py3
Change-Id: I7bb1591a31de777d59ad1b96246bbc4d8e1f86f4
Issue-ID: MULTICLOUD-774
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'windriver/titanium_cloud/extensions/tests/test_extensions.py')
-rw-r--r-- | windriver/titanium_cloud/extensions/tests/test_extensions.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/windriver/titanium_cloud/extensions/tests/test_extensions.py b/windriver/titanium_cloud/extensions/tests/test_extensions.py index 26687b33..978e2023 100644 --- a/windriver/titanium_cloud/extensions/tests/test_extensions.py +++ b/windriver/titanium_cloud/extensions/tests/test_extensions.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017-2018 Wind River Systems, Inc. +# Copyright (c) 2017-2019 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +import unittest from django.test import Client from rest_framework import status -import unittest class TestExtensions(unittest.TestCase): @@ -30,12 +30,12 @@ class TestExtensions(unittest.TestCase): "/api/multicloud-titaniumcloud/v0/" + vimid + "/extensions/") json_content = response.json() - self.assertEquals(status.HTTP_200_OK, response.status_code) - self.assertEquals(4, len(json_content.keys())) + self.assertEqual(status.HTTP_200_OK, response.status_code) + self.assertEqual(4, len(list(json_content.keys()))) - self.assertEquals(cloud_owner, json_content["cloud-owner"]) - self.assertEquals(cloud_region_id, json_content["cloud-region-id"]) - self.assertEquals(vimid, json_content["vimid"]) + self.assertEqual(cloud_owner, json_content["cloud-owner"]) + self.assertEqual(cloud_region_id, json_content["cloud-region-id"]) + self.assertEqual(vimid, json_content["vimid"]) - self.assertEquals("Multiple network support", json_content["extensions"][0]["description"]) - self.assertEquals("", json_content["extensions"][0]["spec"]) + self.assertEqual("Multiple network support", json_content["extensions"][0]["description"]) + self.assertEqual("", json_content["extensions"][0]["spec"]) |