diff -r 1bb43e31032d -r a14b6562082b devtools/fill.py
--- a/devtools/fill.py Tue Feb 14 15:14:22 2012 +0100
+++ b/devtools/fill.py Tue Jul 10 15:07:23 2012 +0200
@@ -20,12 +20,14 @@
__docformat__ = "restructuredtext en"
+import logging
from random import randint, choice
from copy import deepcopy
from datetime import datetime, date, time, timedelta
from decimal import Decimal
from logilab.common import attrdict
+from logilab.mtconverter import xml_escape
from yams.constraints import (SizeConstraint, StaticVocabularyConstraint,
IntervalBoundConstraint, BoundaryConstraint,
Attribute, actual_value)
@@ -238,6 +240,14 @@
# raise exception
return u'text/plain'
+ def generate_CWDataImport_log(self, entity, index, **kwargs):
+ # content_format attribute of EmailPart has no vocabulary constraint, we
+ # need this method else stupid values will be set which make mtconverter
+ # raise exception
+ logs = [u'%s\t%s\t%s\t%s
' % (logging.ERROR, 'http://url.com?arg1=hop&arg2=hip',
+ 1, xml_escape('hjoio&oio"'))]
+ return u'
'.join(logs)
+
class autoextend(type):
def __new__(mcs, name, bases, classdict):
@@ -296,7 +306,7 @@
"""generates a random entity and returns it as a dict
by default, generate an entity to be inserted in the repository
- elif form, generate an form dictionnary to be given to a web controller
+ elif form, generate an form dictionary to be given to a web controller
"""
eschema = schema.eschema(etype)
valgen = ValueGenerator(eschema, choice_func)