[CMF-checkins] CVS: CMF/CMFCore/tests - test_FSPageTemplate.py:1.7

Casey Duncan casey@zope.com
Wed, 31 Jul 2002 17:52:33 -0400


Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv13881/tests

Modified Files:
	test_FSPageTemplate.py 
Log Message:
Added automagic XML detection to FSPageTemplates
Updated tests


=== CMF/CMFCore/tests/test_FSPageTemplate.py 1.6 => 1.7 ===
         script = self._makeOne( 'testPT', 'testPT.pt' )
         script = script.__of__(self.root)
         self.assertEqual(script(),'foo\n')
+        
+    def test_ContentType(self):
+        script = self._makeOne( 'testXMLPT', 'testXMLPT.pt' )
+        script = script.__of__(self.root)
+        script()
+        self.assertEqual(script.content_type, 'text/xml')
+        self.assertEqual(self.RESPONSE.getHeader('content-type'), 'text/xml')
+        script = self._makeOne( 'testPT', 'testPT.pt' )
+        script = script.__of__(self.root)
+        script()
+        self.assertEqual(script.content_type, 'text/html')
+        self.assertEqual(self.RESPONSE.getHeader('content-type'), 'text/html')
 
     def test_BadCall( self ):