From 647f561532c2b4b9c3af6918816faf997db20abb Mon Sep 17 00:00:00 2001 From: "wu.shiming" Date: Fri, 13 Aug 2021 17:15:35 +0800 Subject: [PATCH] Replace deprecated import of ABCs from collections ABCs in collections should be imported from collections.abc and direct import from collections is deprecated since Python 3.3. Change-Id: I871810bbe95a3cd10f8a8df42c99e747a6dd463b --- cloudkittyclient/tests/unit/v1/test_report_cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudkittyclient/tests/unit/v1/test_report_cli.py b/cloudkittyclient/tests/unit/v1/test_report_cli.py index a4d464b..bce53d5 100644 --- a/cloudkittyclient/tests/unit/v1/test_report_cli.py +++ b/cloudkittyclient/tests/unit/v1/test_report_cli.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. # -import collections +from collections import abc from unittest import mock from cloudkittyclient.tests.unit.v1 import base @@ -57,7 +57,7 @@ class TestReportCli(base.BaseAPIEndpointTestCase): assert len(result) == 2 assert result[0] == ('Tenant ID', ) - assert isinstance(result[1], collections.Iterable) + assert isinstance(result[1], abc.Iterable) for res in result[1]: - assert isinstance(res, collections.Iterable) + assert isinstance(res, abc.Iterable)