From f2b75da8dd38077c60cc2c852f73092980c1f906 Mon Sep 17 00:00:00 2001 From: DR695H Date: Wed, 28 Aug 2019 10:52:51 -0400 Subject: fix linter errors and copyright Change-Id: Idf7384307623c70a9f7714a5d276f404873c5974 Issue-ID: TEST-198 Signed-off-by: DR695H --- robotframework-onap/ONAPLibrary/JSONKeywords.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'robotframework-onap/ONAPLibrary/JSONKeywords.py') diff --git a/robotframework-onap/ONAPLibrary/JSONKeywords.py b/robotframework-onap/ONAPLibrary/JSONKeywords.py index e007e6c..5b9e24e 100644 --- a/robotframework-onap/ONAPLibrary/JSONKeywords.py +++ b/robotframework-onap/ONAPLibrary/JSONKeywords.py @@ -11,10 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -import json +import json from robot.api.deco import keyword from deepdiff import DeepDiff +from six import string_types class JSONKeywords(object): @@ -28,11 +29,11 @@ class JSONKeywords(object): def json_equals(self, left, right): """JSON Equals takes in two strings or json objects, converts them into json if needed and then compares them, returning if they are equal or not.""" - if isinstance(left, str) or isinstance(left, unicode): + if isinstance(left, string_types): left_json = json.loads(left) else: left_json = left - if isinstance(right, str) or isinstance(right, unicode): + if isinstance(right, string_types): right_json = json.loads(right) else: right_json = right -- cgit 1.2.3-korg