summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/ONAPLibrary/RequestsHelper.py
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-19 16:55:55 -0400
committerDR695H <dr695h@att.com>2019-07-19 17:50:32 -0400
commit4c8dc6a28644cbd44084296907d54c66b447432e (patch)
tree7d98c75cee99ad3891bebc79847db0d0a1d95ae9 /robotframework-onap/ONAPLibrary/RequestsHelper.py
parent601ead6cc5e04f276d57d118e1d94d1366278a24 (diff)
fixing is not none
Issue-ID: TEST-174 Change-Id: I1b48d6f6839cdbb4df5eb6461ac1a053fcdfbc57 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap/ONAPLibrary/RequestsHelper.py')
-rw-r--r--robotframework-onap/ONAPLibrary/RequestsHelper.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/robotframework-onap/ONAPLibrary/RequestsHelper.py b/robotframework-onap/ONAPLibrary/RequestsHelper.py
index 9de2260..0fd0115 100644
--- a/robotframework-onap/ONAPLibrary/RequestsHelper.py
+++ b/robotframework-onap/ONAPLibrary/RequestsHelper.py
@@ -37,9 +37,9 @@ class RequestsHelper(object):
"X-TransactionId": self.application_id + "-" + uuid,
"X-FromAppId": self.application_id
}
- if not sdc_user_id:
+ if sdc_user_id is not None:
headers["USER_ID"] = sdc_user_id
- if not md5:
+ if md5 is not None:
headers["Content-MD5"] = md5
return headers
@@ -56,7 +56,7 @@ class RequestsHelper(object):
content_type="application/json", auth=None):
"""Runs a post request"""
logger.info("Creating session" + endpoint)
- if not data:
+ if data is not None:
md5 = hashlib.md5()
md5.update(data)
md5checksum = Base64Keywords().base64_encode(md5.hexdigest())