[CMF-checkins] CVS: CMF/CMFDefault/tests - test_Document.py:1.18

Tres Seaver tseaver@zope.com
Sun, 2 Dec 2001 22:02:38 -0500


Update of /cvs-repository/CMF/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv19503/tests

Modified Files:
	test_Document.py 
Log Message:


  - Scrub typo which was suppressing uploaded file (Tracker #417),
    and add test.


=== CMF/CMFDefault/tests/test_Document.py 1.17 => 1.18 ===
         d.edit(text_format=None, text=html)
         assert d.CookedBody() == body
+
+    def test_BigHtml_via_upload(self):
+        d = Document('foo')
+        s = []
+        looper = '<li> number %s</li>'
+        for i in range(12000): s.append(looper % i)
+        body = '<ul>\n%s\n</ul>' % string.join(s, '\n')
+        html = HTML_TEMPLATE % {'title': 'big document',
+                                'body': body}
+        from StringIO import StringIO
+        file = StringIO( html )
+        d.edit(text_format=None, text='', file=file)
+        assert d.CookedBody() == body
         
 
     def test_EditStructuredTextWithHTML(self):