web/test/unittest_form.py
changeset 6637 6bbfc628555b
parent 6340 470d8e828fda
child 7017 cd2ea273007a
equal deleted inserted replaced
6636:dbc9cce53c11 6637:6bbfc628555b
   141             description = RichTextField(eidparam=True, role='subject')
   141             description = RichTextField(eidparam=True, role='subject')
   142         state = self.vreg['etypes'].etype_class('State')(self.req)
   142         state = self.vreg['etypes'].etype_class('State')(self.req)
   143         state.eid = 'S'
   143         state.eid = 'S'
   144         form = RTFForm(self.req, redirect_path='perdu.com', entity=state)
   144         form = RTFForm(self.req, redirect_path='perdu.com', entity=state)
   145         # make it think it can use fck editor anyway
   145         # make it think it can use fck editor anyway
   146         form.field_by_name('description', 'subject').format = lambda x: 'text/html'
   146         form.field_by_name('description', 'subject').format = lambda form, field=None: 'text/html'
   147         self.assertMultiLineEqual(self._render_entity_field('description', form),
   147         self.assertMultiLineEqual(self._render_entity_field('description', form),
   148                               expected % {'eid': state.eid})
   148                               expected % {'eid': state.eid})
   149 
   149 
   150 
   150 
   151     def test_richtextfield_1(self):
   151     def test_richtextfield_1(self):