[CMF-checkins] CVS: CMF - test_ContentTypeRegistry.py:1.6
tseaver@digicool.com
tseaver@digicool.com
Tue, 19 Jun 2001 15:00:34 -0400 (EDT)
Update of /cvs-repository/CMF/CMFCore/tests
In directory korak.digicool.com:/tmp/cvs-serv17724/CMFCore/tests
Modified Files:
test_ContentTypeRegistry.py
Log Message:
- Testing hygeine (make sure we run in isolated ZODB transactions).
--- Updated File test_ContentTypeRegistry.py in package CMF --
--- test_ContentTypeRegistry.py 2001/06/05 18:36:41 1.5
+++ test_ContentTypeRegistry.py 2001/06/19 19:00:03 1.6
@@ -5,6 +5,12 @@
class MajorMinorPredicateTests( unittest.TestCase ):
+ def setUp( self ):
+ get_transaction().begin()
+
+ def tearDown( self ):
+ get_transaction().abort()
+
def test_empty( self ):
pred = MajorMinorPredicate( 'empty' )
assert pred.getMajorType() == 'None'
@@ -39,6 +45,12 @@
class ExtensionPredicateTests( unittest.TestCase ):
+ def setUp( self ):
+ get_transaction().begin()
+
+ def tearDown( self ):
+ get_transaction().abort()
+
def test_empty( self ):
pred = ExtensionPredicate( 'empty' )
assert pred.getExtensions() == 'None'
@@ -67,6 +79,12 @@
class MimeTypeRegexPredicateTests( unittest.TestCase ):
+ def setUp( self ):
+ get_transaction().begin()
+
+ def tearDown( self ):
+ get_transaction().abort()
+
def test_empty( self ):
pred = MimeTypeRegexPredicate( 'empty' )
assert pred.getPatternStr() == 'None'
@@ -89,6 +107,12 @@
class NameRegexPredicateTests( unittest.TestCase ):
+ def setUp( self ):
+ get_transaction().begin()
+
+ def tearDown( self ):
+ get_transaction().abort()
+
def test_empty( self ):
pred = NameRegexPredicate( 'empty' )
assert pred.getPatternStr() == 'None'
@@ -111,6 +135,12 @@
assert not pred( 'bar', 'text/plain', 'asdfljksadf' )
class ContentTypeRegistryTests( unittest.TestCase ):
+
+ def setUp( self ):
+ get_transaction().begin()
+
+ def tearDown( self ):
+ get_transaction().abort()
def test_empty( self ):
reg = ContentTypeRegistry()