[CMF-checkins] CVS: CMF/CMFCore/tests - test_DirectoryView.py:1.16
test_FSPythonScript.py:1.6 test_MemberDataTool.py:1.4
test_PortalFolder.py:1.24
Yvo Schubbe
cvs-admin at zope.org
Sun Dec 7 15:44:38 EST 2003
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv16804/CMFCore/tests
Modified Files:
test_DirectoryView.py test_FSPythonScript.py
test_MemberDataTool.py test_PortalFolder.py
Log Message:
Fixed some new-style ExtensionClass compatibility issues. Thanks to Dieter Maurer for his patch!
=== CMF/CMFCore/tests/test_DirectoryView.py 1.15 => 1.16 ===
--- CMF/CMFCore/tests/test_DirectoryView.py:1.15 Mon Jun 23 08:21:42 2003
+++ CMF/CMFCore/tests/test_DirectoryView.py Sun Dec 7 15:44:07 2003
@@ -1,5 +1,6 @@
from unittest import TestCase, TestSuite, makeSuite, main
+import Testing
import Zope
try:
Zope.startup()
=== CMF/CMFCore/tests/test_FSPythonScript.py 1.5 => 1.6 ===
--- CMF/CMFCore/tests/test_FSPythonScript.py:1.5 Mon Aug 19 13:29:32 2002
+++ CMF/CMFCore/tests/test_FSPythonScript.py Sun Dec 7 15:44:07 2003
@@ -1,13 +1,21 @@
+from unittest import TestSuite, makeSuite, main
+
import Testing
import Zope
+try:
+ Zope.startup()
+except AttributeError:
+ # for Zope versions before 2.6.1
+ pass
+
from OFS.Folder import Folder
-from unittest import TestCase, TestSuite, makeSuite, main
from Products.CMFCore.FSPythonScript import FSPythonScript
from Products.CMFCore.tests.base.testcase import FSDVTest
from os.path import join
import sys, time
from thread import start_new_thread
+
class FSPythonScriptTests( FSDVTest ):
def test_GetSize( self ):
@@ -36,6 +44,7 @@
time.sleep(0.05)
self.assertEqual(res, ['test1', 'test1'], res)
+
def test_suite():
return TestSuite((
makeSuite(FSPythonScriptTests),
@@ -43,4 +52,3 @@
if __name__ == '__main__':
main(defaultTest='test_suite')
-
=== CMF/CMFCore/tests/test_MemberDataTool.py 1.3 => 1.4 ===
--- CMF/CMFCore/tests/test_MemberDataTool.py:1.3 Wed Sep 24 06:02:15 2003
+++ CMF/CMFCore/tests/test_MemberDataTool.py Sun Dec 7 15:44:07 2003
@@ -1,5 +1,6 @@
from unittest import TestCase, TestSuite, makeSuite, main
+import Testing
import Zope
try:
Zope.startup()
=== CMF/CMFCore/tests/test_PortalFolder.py 1.23 => 1.24 ===
--- CMF/CMFCore/tests/test_PortalFolder.py:1.23 Sat Jun 28 12:31:21 2003
+++ CMF/CMFCore/tests/test_PortalFolder.py Sun Dec 7 15:44:07 2003
@@ -1,5 +1,6 @@
from unittest import TestCase, TestSuite, makeSuite, main
+import Testing
import Zope
try:
Zope.startup()
@@ -376,6 +377,7 @@
assert has_path( catalog._catalog, '/test/sub2/dummy' )
assert has_path( catalog._catalog, '/test/sub3/dummy' )
+
class ContentFilterTests( TestCase ):
def setUp( self ):
@@ -442,7 +444,7 @@
lines = desc.split('; ')
assert len( lines ) == 1
assert lines[0] == 'Title: foo'
-
+
def test_Creator( self ):
cfilter = ContentFilter( Creator='moe' )
dummy = self.dummy
@@ -457,7 +459,7 @@
lines = desc.split('; ')
self.assertEqual(len( lines ),1)
self.assertEqual(lines[0],'Creator: moe')
-
+
def test_Description( self ):
cfilter = ContentFilter( Description='funny' )
dummy = self.dummy
@@ -472,7 +474,7 @@
lines = desc.split('; ')
assert len( lines ) == 1
assert lines[0] == 'Description: funny'
-
+
def test_Subject( self ):
cfilter = ContentFilter( Subject=('foo',) )
dummy = self.dummy
@@ -505,7 +507,7 @@
lines = desc.split('; ')
assert len( lines ) == 1
assert lines[0] == 'Subject: foo, bar'
-
+
def test_created( self ):
cfilter = ContentFilter( created=DateTime( '2001/01/01' )
, created_usage='range:min' )
@@ -523,7 +525,6 @@
assert lines[0] == 'Created since: 2001/01/01'
def test_created2( self ):
-
cfilter = ContentFilter( created=DateTime( '2001/01/01' )
, created_usage='range:max' )
@@ -539,7 +540,7 @@
lines = desc.split('; ')
assert len( lines ) == 1
assert lines[0] == 'Created before: 2001/01/01'
-
+
def test_modified( self ):
cfilter = ContentFilter( modified=DateTime( '2001/01/01' )
, modified_usage='range:min' )
@@ -558,7 +559,7 @@
def test_modified2( self ):
cfilter = ContentFilter( modified=DateTime( '2001/01/01' )
- , modified_usage='range:max' )
+ , modified_usage='range:max' )
dummy = self.dummy
assert not cfilter( dummy )
dummy.modified_date = DateTime( '2000/12/31' )
@@ -571,7 +572,7 @@
lines = desc.split('; ')
assert len( lines ) == 1
assert lines[0] == 'Modified before: 2001/01/01'
-
+
def test_mixed( self ):
cfilter = ContentFilter( created=DateTime( '2001/01/01' )
, created_usage='range:max'
@@ -602,6 +603,7 @@
assert len( lines ) == 2, lines
assert 'Created before: 2001/01/01' in lines
assert 'Title: foo' in lines
+
def test_suite():
return TestSuite((
More information about the CMF-checkins
mailing list