[Zope-CVS] CVS: Products/ZopeVersionControl/tests - testVersionControl.py:1.8

Ken Manheimer klm at zope.com
Tue Feb 24 13:30:11 EST 2004


Update of /cvs-repository/Products/ZopeVersionControl/tests
In directory cvs.zope.org:/tmp/cvs-serv13094

Modified Files:
	testVersionControl.py 
Log Message:
Exercise versioning-system exemption mechanism.

Use now-canonical repository.isAVersionableResource() test on 
now-sole and -canonical versioning exemption attribute,
__non_versionable__.  Passes after fix to .isAVersionableResource(),
which i'll check in next.


=== Products/ZopeVersionControl/tests/testVersionControl.py 1.7 => 1.8 ===
--- Products/ZopeVersionControl/tests/testVersionControl.py:1.7	Fri Jan 30 13:59:40 2004
+++ Products/ZopeVersionControl/tests/testVersionControl.py	Tue Feb 24 13:30:10 2004
@@ -58,6 +58,10 @@
             self.document1 = getattr(self.folder2, 'document1')
             addDTMLDocument(self.folder2, 'document2', file='some text')
             self.document2 = getattr(self.folder2, 'document2')
+            addDTMLDocument(self.folder2, 'document_nonversion', file='some?')
+            self.document_nonversion = getattr(self.folder2,
+                                               'document_nonversion')
+            self.document_nonversion.__non_versionable__ = 1
             addRepository(self.folder1, 'repository')
             self.repository = getattr(self.folder1, 'repository')
             get_transaction().commit()            
@@ -93,7 +97,9 @@
         # Test checking whether an object is a versionable resource.
         repository = self.repository
         document = self.document1
+        nonversionable = self.document_nonversion
         self.failUnless(repository.isAVersionableResource(document))
+        self.failIf(repository.isAVersionableResource(nonversionable))
         self.failIf(repository.isAVersionableResource('foobar'))
         self.failIf(repository.isAVersionableResource(self))
 




More information about the Zope-CVS mailing list