[Zope3-checkins] CVS: Zope3/src/zope/app/browser/content/tests - test_dtmlpageeval.py:1.6 test_zptpageeval.py:1.7

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Aug 6 11:42:23 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/content/tests
In directory cvs.zope.org:/tmp/cvs-serv17028/app/browser/content/tests

Modified Files:
	test_dtmlpageeval.py test_zptpageeval.py 
Log Message:
Internationalized a whole bunch templates and screens. I also took the 
oppurtunity to clean some old code up. 

I noticed that particularly the basic Content Objects are in bad shape.

There is still a lot left to do!


=== Zope3/src/zope/app/browser/content/tests/test_dtmlpageeval.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/browser/content/tests/test_dtmlpageeval.py:1.5	Sun Jun  1 11:59:26 2003
+++ Zope3/src/zope/app/browser/content/tests/test_dtmlpageeval.py	Wed Aug  6 10:41:49 2003
@@ -11,20 +11,15 @@
 # FOR A PARTICULAR PURPOSE
 #
 ##############################################################################
-"""
+"""DTML Page Evaluation Tests
 
 $Id$
 """
-
 from unittest import TestCase, main, makeSuite
-from zope.testing.cleanup import CleanUp # Base class w registry cleanup
-
-from zope.app.browser.content.dtmlpageeval import \
-     DTMLPageEval
+from zope.app.browser.content.dtmlpageeval import DTMLPageEval
 from zope.app.context import ContextWrapper
 
-
-class Test(CleanUp, TestCase):
+class Test(TestCase):
 
     def test(self):
 
@@ -50,10 +45,12 @@
                 setattr(self, name, value)
 
         request = Request()
-
         template = ContextWrapper(Template(), folder)
 
-        view = DTMLPageEval(template, None)
+        view = DTMLPageEval()
+        # Do manually, since directive adds BrowserView as base class
+        view.context = template
+        view.request = request
         self.assertEqual(view.index(request), 42)
         self.assertEqual(template.called, (request, {}))
         self.assertEqual(getattr(request, 'content-type'), 'text/x-test')


=== Zope3/src/zope/app/browser/content/tests/test_zptpageeval.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/content/tests/test_zptpageeval.py:1.6	Sun Jun  1 11:59:26 2003
+++ Zope3/src/zope/app/browser/content/tests/test_zptpageeval.py	Wed Aug  6 10:41:49 2003
@@ -50,7 +50,10 @@
 
         template = ContextWrapper(Template(), folder)
 
-        view = ZPTPageEval(template, request)
+        view = ZPTPageEval()
+        # Do manually, since directive adds BrowserView as base class
+        view.context = template
+        view.request = request
         self.assertEqual(view.index(), 42)
         self.assertEqual(template.called, (request, {}))
         self.assertEqual(getattr(request, 'content-type'), 'text/x-test')




More information about the Zope3-Checkins mailing list