web/test/unittest_form.py
changeset 2234 1fbcf202882d
parent 2181 94ca417b9b07
parent 2198 ac45d4dbaf76
child 2293 7ded2a1416e4
--- a/web/test/unittest_form.py	Mon Jun 29 14:12:18 2009 +0200
+++ b/web/test/unittest_form.py	Thu Jul 02 10:35:03 2009 +0200
@@ -5,6 +5,7 @@
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
 """
+from __future__ import with_statement
 
 from xml.etree.ElementTree import fromstring
 
@@ -98,6 +99,14 @@
         inputs = pageinfo.find_tag('input', False)
         self.failIf(any(attrs for t, attrs in inputs if attrs.get('name') == '__linkto'))
 
+    def test_reledit_composite_field(self):
+        rset = self.execute('INSERT BlogEntry X: X title "cubicweb.org", X content "hop"')
+        form = self.vreg.select_object('views', 'reledit', self.request(),
+                                       rset=rset, row=0, rtype='content')
+        data = form.render(row=0, rtype='content')
+        self.failUnless('edits-content' in data)
+        self.failUnless('edits-content_format' in data)
+
     # form view tests #########################################################
 
     def test_massmailing_formview(self):