diff --git a/common/OpTestUtil.py b/common/OpTestUtil.py index b283e260..e34d2edc 100644 --- a/common/OpTestUtil.py +++ b/common/OpTestUtil.py @@ -2574,6 +2574,12 @@ def login(self, username=None, password=None): self.xAuthHeader['X-Auth-Token'] = match.group(1) self.jsonHeader.update(self.xAuthHeader) json_data = json.loads(r.text) + if json_data.get('token'): + json_data={ + "data": "User '%s' logged in" %username, + "message": "200 OK", + "status": "ok" + } log.debug("r.status_code={} json_data['status']={}" " r.text={} r.headers={} r.request.headers={}" .format(r.status_code, json_data['status'],