[Zope-Checkins] SVN: Zope/trunk/lib/python/reStructuredText/tests/testReST.py added tests for 'raw' and 'include' directives. They should

Andreas Jung andreas at andreas-jung.com
Sun Jul 9 03:47:48 EDT 2006


Log message for revision 69054:
  added tests for 'raw' and 'include' directives. They should
  raise NotImplementedError for security reasons
  

Changed:
  U   Zope/trunk/lib/python/reStructuredText/tests/testReST.py

-=-
Modified: Zope/trunk/lib/python/reStructuredText/tests/testReST.py
===================================================================
--- Zope/trunk/lib/python/reStructuredText/tests/testReST.py	2006-07-09 07:27:11 UTC (rev 69053)
+++ Zope/trunk/lib/python/reStructuredText/tests/testReST.py	2006-07-09 07:47:47 UTC (rev 69054)
@@ -82,6 +82,17 @@
         self.assertEquals(output, expected) 
 
 
+    def testFileInclusion(self):
+        source = 'hello world\n .. include:: /etc/passwd'
+        self.assertRaises(NotImplementedError, HTML, source)
+
+# disabled test so far until we have a consensus how to deal with 'raw'
+#    def testRawPassthrough(self):
+#
+#        source = '.. raw:: html\n\n  <h1>HELLO WORLD</h1>'
+#        self.assertRaises(NotImplementedError, HTML, source)
+
+
 def test_suite():
     from unittest import TestSuite, makeSuite
     return TestSuite((makeSuite(TestReST),))



More information about the Zope-Checkins mailing list