[Zope3-checkins] CVS: Zope3/src/zope/app/utilities/tests - test_schemautility.py:1.8

Sidnei da Silva sidnei at x3ng.com.br
Wed Dec 17 16:27:34 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/utilities/tests
In directory cvs.zope.org:/tmp/cvs-serv14741/src/zope/app/utilities/tests

Modified Files:
	test_schemautility.py 
Log Message:
Small refactoring to make it easier to reuse the SchemaUtility on different contexts (like, storing the fields on a RDBMS)


=== Zope3/src/zope/app/utilities/tests/test_schemautility.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/utilities/tests/test_schemautility.py:1.7	Fri Dec 12 17:24:03 2003
+++ Zope3/src/zope/app/utilities/tests/test_schemautility.py	Wed Dec 17 16:27:33 2003
@@ -29,11 +29,17 @@
 
 class SchemaUtilityTests(TestCase):
 
-    def setUp(self):
-        setup.placefulSetUp()
-        self.s = SchemaUtility()
+    def _createSchemaUtility(self):
+        return SchemaUtility()
+
+    def _additionalSetup(self):
+        self.s = self._createSchemaUtility()
         self.s.setName('IFoo')
         self.alpha = Text(title=u"alpha")
+
+    def setUp(self):
+        setup.placefulSetUp()
+        self._additionalSetup()
 
     def test_addField(self):
         s = self.s




More information about the Zope3-Checkins mailing list