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

Jeffrey Shell jshell@cvs.zope.org
Mon, 6 Aug 2001 10:18:02 -0400


Update of /cvs-repository/Products/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv25854/tests

Modified Files:
	test_Document.py 
Log Message:
Fixed Document#guessFormat() to use utils.html_headcheck() instead of bodyfinder to detect structured text versus html.  Tested in tests.test_Document.DocumentTests#test_EditStructuredTextWithHTML()

=== Products/CMFDefault/tests/test_Document.py 1.12 => 1.13 ===
         assert d.Description() == 'Describe me'
 
+    def test_EditStructuredTextWithHTML(self):
+        d = Document('foo')
+        d.edit(text_format=None, text=STX_WITH_HTML)
+        
+        assert d.Format() == 'text/plain', "%s != %s" % (
+            d.Format(), 'text/plain')
+
     def test_StructuredText(self):
         d = Document('foo')
         assert hasattr(d, 'cooked_text')