[Zodb-checkins] CVS: ZODB4/src/zodb/code/tests - test_class.py:1.2

Jeremy Hylton jeremy@zope.com
Tue, 21 Jan 2003 11:05:58 -0500


Update of /cvs-repository/ZODB4/src/zodb/code/tests
In directory cvs.zope.org:/tmp/cvs-serv23413/src/zodb/code/tests

Modified Files:
	test_class.py 
Log Message:
Use new managed registry.


=== ZODB4/src/zodb/code/tests/test_class.py 1.1 => 1.2 ===
--- ZODB4/src/zodb/code/tests/test_class.py:1.1	Mon Dec 30 14:21:42 2002
+++ ZODB4/src/zodb/code/tests/test_class.py	Tue Jan 21 11:05:54 2003
@@ -22,7 +22,6 @@
 
 from transaction import get_transaction
 
-
 class TestClass(TestBase):
 
     class_with_init = """class Foo:
@@ -30,7 +29,7 @@
         self.var = arg""" "\n"
 
     def testClassWithInit(self):
-        mgr = newModule(self.registry, "testclass", self.class_with_init)
+        self.registry.newModule("testclass", self.class_with_init)
         get_transaction().commit()
         import testclass
         x = testclass.Foo(12)
@@ -49,7 +48,7 @@
 x = Foo(12)""" "\n"
 
     def testClassAndInstance(self):
-        mgr = newModule(self.registry, "testclass", self.class_and_instance)
+        self.registry.newModule("testclass", self.class_and_instance)
         get_transaction().commit()
         import testclass
         self.assertEqual(testclass.x.var, 12)
@@ -57,9 +56,9 @@
     cross_module_import = "from testclass import Foo"
 
     def testCrossModuleImport(self):
-        mgr = newModule(self.registry, "testclass", self.class_with_init)
+        self.registry.newModule("testclass", self.class_with_init)
         get_transaction().commit()
-        mgr2 = newModule(self.registry, "another", self.cross_module_import)
+        self.registry.newModule("another", self.cross_module_import)
         get_transaction().commit()
 
     update_in_place1 = """class Foo:
@@ -71,16 +70,15 @@
         return arg + 3""" "\n"
 
     def testUpdateInPlace(self):
-        mgr = newModule(self.registry, "testclass", self.update_in_place1)
+        self.registry.newModule("testclass", self.update_in_place1)
         get_transaction().commit()
         import testclass
         inst = testclass.Foo()
         self.assertEqual(inst.meth(4), 12)
 
-        mgr.update(self.update_in_place2)
+        self.registry.updateModule("testclass", self.update_in_place2)
         get_transaction().commit()
         self.assertEqual(inst.meth(4), 7)
         
-
 def test_suite():
     return unittest.makeSuite(TestClass)