devtools/fill.py
changeset 5575 8a531340c3ef
parent 5424 8ecbcbff9777
child 5811 e77cea9721e7
equal deleted inserted replaced
5574:e082a57c2207 5575:8a531340c3ef
   215                 return unicode(choice(cst.vocabulary()))
   215                 return unicode(choice(cst.vocabulary()))
   216         return None
   216         return None
   217 
   217 
   218     # XXX nothing to do here
   218     # XXX nothing to do here
   219     def generate_Any_data_format(self, entity, index, **kwargs):
   219     def generate_Any_data_format(self, entity, index, **kwargs):
   220         # data_format attribute of Image/File has no vocabulary constraint, we
   220         # data_format attribute of File has no vocabulary constraint, we
   221         # need this method else stupid values will be set which make mtconverter
   221         # need this method else stupid values will be set which make mtconverter
   222         # raise exception
   222         # raise exception
   223         return u'application/octet-stream'
   223         return u'application/octet-stream'
   224 
   224 
   225     def generate_Any_content_format(self, entity, index, **kwargs):
   225     def generate_Any_content_format(self, entity, index, **kwargs):
   226         # content_format attribute of EmailPart has no vocabulary constraint, we
   226         # content_format attribute of EmailPart has no vocabulary constraint, we
   227         # need this method else stupid values will be set which make mtconverter
   227         # need this method else stupid values will be set which make mtconverter
   228         # raise exception
   228         # raise exception
   229         return u'text/plain'
   229         return u'text/plain'
   230 
       
   231     def generate_Image_data_format(self, entity, index, **kwargs):
       
   232         # data_format attribute of Image/File has no vocabulary constraint, we
       
   233         # need this method else stupid values will be set which make mtconverter
       
   234         # raise exception
       
   235         return u'image/png'
       
   236 
   230 
   237 
   231 
   238 class autoextend(type):
   232 class autoextend(type):
   239     def __new__(mcs, name, bases, classdict):
   233     def __new__(mcs, name, bases, classdict):
   240         for attrname, attrvalue in classdict.items():
   234         for attrname, attrvalue in classdict.items():