summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/eteutils/JSONUtils.py
diff options
context:
space:
mode:
authorYang Xu <yang.xu3@huawei.com>2019-05-05 22:59:57 -0400
committerYang Xu <yang.xu3@huawei.com>2019-05-05 23:02:35 -0400
commit1a18e91083fdd58ea528513fdf85db678deeb0c7 (patch)
tree7ce135517117923d309ebbd73223f1feec79f77e /robotframework-onap/eteutils/JSONUtils.py
parent8ad85420e45ffeafb536de55b31ad68c0d03c986 (diff)
Check unicode for string
Change-Id: I2d647a82fa38b1ef9ee5b8a2d80296f069e2f079 Issue-ID: INT-1064 Signed-off-by: Yang Xu <yang.xu3@huawei.com>
Diffstat (limited to 'robotframework-onap/eteutils/JSONUtils.py')
-rw-r--r--robotframework-onap/eteutils/JSONUtils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/robotframework-onap/eteutils/JSONUtils.py b/robotframework-onap/eteutils/JSONUtils.py
index e5de182..2d0868c 100644
--- a/robotframework-onap/eteutils/JSONUtils.py
+++ b/robotframework-onap/eteutils/JSONUtils.py
@@ -7,11 +7,11 @@ class JSONUtils:
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):
+ if isinstance(left, str) or isinstance(left, unicode):
left_json = json.loads(left);
else:
left_json = left;
- if isinstance(right, str):
+ if isinstance(right, str) or isinstance(right, unicode):
right_json = json.loads(right);
else:
right_json = right;