[CMF-checkins] CVS: CMF - test_Document.py:1.3

Jeffrey Shell jeffrey@digicool.com
Fri, 30 Mar 2001 11:45:29 -0500 (EST)


Update of /cvs-repository/CMF/CMFDefault/tests
In directory korak:/home/jeffrey/InstanceHomes/cmf-dev/CMF/CMFDefault/tests

Modified Files:
	test_Document.py 
Log Message:
Added new test to catch handling of HTML Entities in places like
'title'.



--- Updated File test_Document.py in package CMF --
--- test_Document.py	2001/03/29 22:35:03	1.2
+++ test_Document.py	2001/03/30 16:45:28	1.3
@@ -16,6 +16,17 @@
 </html>
 '''
 
+ENTITY_IN_TITLE = '''\
+<html>
+ <head>
+  <title>&Auuml;rger</title>
+ </head>
+ <bOdY>
+  <h2>Not a lot here either</h2>
+ </bodY>
+</html>
+'''
+
 BASIC_STRUCTUREDTEXT = '''\
 Title: My Document
 Description: A document by me
@@ -55,6 +66,12 @@
         assert string.find(d.text, '</BODY') == -1
         assert d.Description() == 'DESCRIBE ME'
         assert len(d.Contributors()) == 2
+
+    def test_EntityInTitle(self):
+        d = Document('foo')
+        d.edit(text_format='html', text=ENTITY_IN_TITLE)
+        assert d.title == '&Auuml;rger', "Title '%s' being lost" % (
+            d.title )
 
     def test_HtmlWithDoctype(self):
         d = Document('foo')