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

Tres Seaver tseaver at zope.com
Sat Mar 6 16:55:16 EST 2004


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

Modified Files:
	test_FSPageTemplate.py 
Log Message:


  - Collector #227:  expose ZPT filename in tracebacks which include
    FSPageTemplates.


=== CMF/CMFCore/tests/test_FSPageTemplate.py 1.11 => 1.12 ===
--- CMF/CMFCore/tests/test_FSPageTemplate.py:1.11	Fri Jan  2 07:55:58 2004
+++ CMF/CMFCore/tests/test_FSPageTemplate.py	Sat Mar  6 16:55:15 2004
@@ -58,7 +58,8 @@
         script = self._makeOne( 'testPT_utf8', 'testPT_utf8.pt' )
         script = script.__of__(self.root)
         script()
-        self.assertEqual(self.RESPONSE.getHeader('content-type'), 'text/html; charset=utf-8')
+        self.assertEqual( self.RESPONSE.getHeader('content-type')
+                        , 'text/html; charset=utf-8')
 
     def test_BadCall( self ):
 
@@ -74,9 +75,8 @@
             self.fail('Calling a bad template did not raise an exception')
 
     def test_caching( self ):
-        """
-            Test HTTP caching headers.
-        """
+
+        #   Test HTTP caching headers.
         self.root.caching_policy_manager = DummyCachingManager()
         original_len = len( self.RESPONSE.headers )
         script = self._makeOne('testPT', 'testPT.pt')
@@ -86,6 +86,11 @@
         self.failUnless( 'foo' in self.RESPONSE.headers.keys() )
         self.failUnless( 'bar' in self.RESPONSE.headers.keys() )
 
+    def test_pt_properties( self ):
+
+        script = self._makeOne( 'testPT', 'testPT.pt' )
+        self.assertEqual( script.pt_source_file()
+                        , 'file:%s/testPT.pt' % self.skin_path_name )
 
 class FSPageTemplateCustomizationTests( SecurityTest, FSPTMaker ):
 




More information about the CMF-checkins mailing list