re_match = uri_re.match(request.path)
if not re_match:
continue
- for k, v in re_match.groupdict().items():
+ for k, v in list(re_match.groupdict().items()):
data = data.replace('<%s>' % k, v)
return Response(data=json.loads(data), status=code)
return Response(data={"stub": "stub"}, status=status.HTTP_200_OK)
response = self.client.get("/api/vnfmgr/v1/swagger.json")
with open(options['name'], 'w') as swagger_file:
swagger_file.write(json.dumps(response.data))
- print("swagger api is written to %s" % options['name'])
+ print(("swagger api is written to %s" % options['name']))