Commit cba1f0e2 authored by Jérome Perrin's avatar Jérome Perrin

Enable coding style for scalability test

See merge request nexedi/erp5!1265
parents 408cc3bd 90bc4fc4
Pipeline #11578 failed with stage
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Address" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>region/europe/western_europe/france</string>
</tuple>
</value>
</item>
<item>
<key> <string>city</string> </key>
<value> <string>Paris</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>default_address</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Address</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>street_address</string> </key>
<value> <string>Telecom</string> </value>
</item>
<item>
<key> <string>zip_code</string> </key>
<value> <string>75013</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Email" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>coordinate_text</string> </key>
<value> <string>scalability@nexedi.com</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>default_email</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Email</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>url_string</string> </key>
<value> <string>scalability@nexedi.com</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Telephone" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>coordinate_text</string> </key>
<value> <string>1111111111</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>default_telephone</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Telephone</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>telephone_area</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>telephone_city</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>telephone_country</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>telephone_extension</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>telephone_number</string> </key>
<value> <string>1111111111</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -4,7 +4,6 @@ import random
import string
import json
request = context.REQUEST
portal = context.getPortalObject()
portal_catalog = portal.portal_catalog
......
......@@ -59,6 +59,5 @@ try:
)
user.validate()
except Exception as e:
status_code = 1
error_message = str(e)
raise e
......@@ -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))
person_per_hour = 60*person_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})
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