[CMF-checkins] CVS: CMF/CMFCore/tests - test_FSPageTemplate.py:1.6.4.1
Tres Seaver
tseaver@zope.com
Thu, 1 Aug 2002 09:51:41 -0400
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv23956/CMFCore/tests
Modified Files:
Tag: CMF-1_3-branch
test_FSPageTemplate.py
Log Message:
- Merge Casey's patch for proper XML detection from the head.
=== CMF/CMFCore/tests/test_FSPageTemplate.py 1.6 => 1.6.4.1 ===
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 ):