From 437fe82078c7e3c6489b715a837aa74b0d8028da Mon Sep 17 00:00:00 2001 From: asarfaty Date: Wed, 18 Dec 2019 08:48:17 +0200 Subject: [PATCH] Fix test pep8 issue Change-Id: I1f91966606285646b928325583d2a3bd06e5fa49 --- vmware_nsxlib/tests/unit/v3/test_client.py | 5 ++--- vmware_nsxlib/v3/__init__.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/vmware_nsxlib/tests/unit/v3/test_client.py b/vmware_nsxlib/tests/unit/v3/test_client.py index 1d14578b..20fcbbe3 100644 --- a/vmware_nsxlib/tests/unit/v3/test_client.py +++ b/vmware_nsxlib/tests/unit/v3/test_client.py @@ -337,12 +337,11 @@ class NsxV3JSONClientTestCase(nsxlib_testcase.NsxClientTestCase): self.assertEqual(resp, {'result': {'ok': 200}}) def test_mask_password(self): - pwds = ('my!pwd0#', 'some0therlong$pwd', 'pwd') + pwds = ('my!pwd0#', 'some0therlong$pwd') body = {'name_pwd': 'name1', 'password': pwds[0], 'some_list': {'name_password': 'name2', - 'password': pwds[1]}, - 'password': pwds[2]} + 'password': pwds[1]}} cl = client.RESTClient(None) json_body = jsonutils.dumps(body) diff --git a/vmware_nsxlib/v3/__init__.py b/vmware_nsxlib/v3/__init__.py index 811a3481..d646e193 100644 --- a/vmware_nsxlib/v3/__init__.py +++ b/vmware_nsxlib/v3/__init__.py @@ -164,7 +164,7 @@ class NsxLib(lib.NsxLibBase): def export_restricted(self): node = self.client.get("node") - return node.get('export_type') is 'RESTRICTED' + return node.get('export_type') == 'RESTRICTED' def feature_supported(self, feature): if (version.LooseVersion(self.get_version()) >=