[CMF-checkins] CVS: CMF - test_DateC.py:1.5 test_ListC.py:1.5 test_SIC.py:1.5 test_SSC.py:1.5 test_Topic.py:1.7

tseaver@digicool.com tseaver@digicool.com
Tue, 19 Jun 2001 15:00:05 -0400 (EDT)


Update of /cvs-repository/CMF/CMFTopic/tests
In directory korak.digicool.com:/tmp/cvs-serv17724/CMFTopic/tests

Modified Files:
	test_DateC.py test_ListC.py test_SIC.py test_SSC.py 
	test_Topic.py 
Log Message:


 - Testing hygeine (make sure we run in isolated ZODB transactions).



--- Updated File test_DateC.py in package CMF --
--- test_DateC.py	2001/05/22 13:28:49	1.4
+++ test_DateC.py	2001/06/19 19:00:04	1.5
@@ -17,6 +17,12 @@
         'daterange': 'ahead',
         }
 
+    def setUp( self ):
+        get_transaction().begin()
+
+    def tearDown( self ):
+        get_transaction().abort()
+
     def test_Empty(self):
         friendly = FriendlyDate('foo', 'foofield')
         assert friendly.getId() == 'foo'

--- Updated File test_ListC.py in package CMF --
--- test_ListC.py	2001/04/08 19:18:23	1.4
+++ test_ListC.py	2001/06/19 19:00:04	1.5
@@ -5,6 +5,12 @@
 
 
 class TestListCriterion(unittest.TestCase):
+
+    def setUp( self ):
+        get_transaction().begin()
+
+    def tearDown( self ):
+        get_transaction().abort()
     
     def test_Empty( self ):
         listc = LISTC('foo', 'foofield')

--- Updated File test_SIC.py in package CMF --
--- test_SIC.py	2001/04/08 19:18:23	1.4
+++ test_SIC.py	2001/06/19 19:00:04	1.5
@@ -6,6 +6,12 @@
 
 class TestSimpleInt(unittest.TestCase):
 
+    def setUp( self ):
+        get_transaction().begin()
+
+    def tearDown( self ):
+        get_transaction().abort()
+
     def test_Empty(self):
         sic = SIC('foo', 'foofield' )
         assert sic.getId() == 'foo'

--- Updated File test_SSC.py in package CMF --
--- test_SSC.py	2001/04/08 19:18:23	1.4
+++ test_SSC.py	2001/06/19 19:00:04	1.5
@@ -5,6 +5,12 @@
 
 
 class TestSimpleString(unittest.TestCase):
+
+    def setUp( self ):
+        get_transaction().begin()
+
+    def tearDown( self ):
+        get_transaction().abort()
     
     def test_Empty( self ):
         ssc = SSC('foo', 'foofield')

--- Updated File test_Topic.py in package CMF --
--- test_Topic.py	2001/05/07 14:43:12	1.6
+++ test_Topic.py	2001/06/19 19:00:04	1.7
@@ -10,6 +10,13 @@
 
 class TestTopic(unittest.TestCase):
     """ Test all the general Topic cases  """
+
+    def setUp( self ):
+        get_transaction().begin()
+
+    def tearDown( self ):
+        get_transaction().abort()
+
     def test_Empty( self ):
         topic = Topic('top')
         assert len(topic._criteriaTypes) == 4
@@ -50,38 +57,6 @@
         assert len(query) == 1
         assert query['baz'] == 'bam'
 
-##    def test_EditCriterion(self):
-##        topic = Topic('top')
-##        topic._setObject('crit__foo', SSC('crit__foo', 'foo'))
-##        topic._setObject('crit__bar', SIC('crit__bar', 'bar'))
-
-##        class CritRecord:
-##            pass
-##        foorec = CritRecord()
-##        barrec = CritRecord()
-
-##        foorec.id = 'crit__foo'
-##        foorec.value = 'goodfoo'
-
-##        barrec.id = 'crit__bar'
-##        barrec.value = '12'
-
-##        query = topic.buildQuery()
-##        assert len(query) == 0
-##        topic.editCriteria([foorec, barrec])
-##        query = topic.buildQuery()
-##        assert len(query) == 2
-##        assert query['foo'] == 'goodfoo'
-##        assert query['bar'] == 12
-
-##        barrec.direction = SIC.MINIMUM
-##        topic.editCriteria([barrec])
-##        query = topic.buildQuery()
-##        assert len(query) == 3
-##        assert query['bar_usage'] == 'range:min'
-##        assert query['foo'] == 'goodfoo'
-        
-    
 def test_suite():
     return unittest.makeSuite(TestTopic)