Commit 90bc4fc4 authored by Jérome Perrin's avatar Jérome Perrin

scalability_test: fix pylint warning and enable coding style test

parent 64c68dcb
...@@ -4,7 +4,6 @@ import random ...@@ -4,7 +4,6 @@ import random
import string import string
import json import json
request = context.REQUEST
portal = context.getPortalObject() portal = context.getPortalObject()
portal_catalog = portal.portal_catalog portal_catalog = portal.portal_catalog
......
...@@ -59,6 +59,5 @@ try: ...@@ -59,6 +59,5 @@ try:
) )
user.validate() user.validate()
except Exception as e: except Exception as e:
status_code = 1
error_message = str(e) error_message = str(e)
raise e raise e
...@@ -11,5 +11,4 @@ catalog_kw = {'creation_date': {'query': (now_minus_6, now_minus_1), 'range': 'm ...@@ -11,5 +11,4 @@ catalog_kw = {'creation_date': {'query': (now_minus_6, now_minus_1), 'range': 'm
sale_order_count = len(portal_catalog(portal_type="Sale Order", **catalog_kw)) sale_order_count = len(portal_catalog(portal_type="Sale Order", **catalog_kw))
person_per_hour = 60*person_count/5 person_per_hour = 60*person_count/5
sale_order_per_hour = 60*sale_order_count/5 sale_order_per_hour = 60*sale_order_count/5
output_string = """Person: %r doc/hour SaleOrder: %r doc/hour""" % (person_per_hour, sale_order_per_hour)
return json.dumps({"person_per_hour" : person_per_hour, "sale_order_per_hour": sale_order_per_hour}) return json.dumps({"person_per_hour" : person_per_hour, "sale_order_per_hour": sale_order_per_hour})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment