[CMF-checkins] CVS: CMF/CMFStaging/tests - testVersions.py:1.2

Shane Hathaway shane@cvs.zope.org
Mon, 17 Jun 2002 12:35:51 -0400


Update of /cvs-repository/CMF/CMFStaging/tests
In directory cvs.zope.org:/tmp/cvs-serv23008/tests

Modified Files:
	testVersions.py 
Log Message:
More careful sticky tag avoidance


=== CMF/CMFStaging/tests/testVersions.py 1.1 => 1.2 ===
         # Can't normally check out when the object is in an old state
         self.assertRaises(VersionControlError, vt.checkout, content)
+
+        # Can't check out when the object is in the current state
+        # but there's a sticky tag.
+        vt.revertToVersion(content, new_id)
+        self.assertRaises(VersionControlError, vt.checkout, content)
         
         vt.auto_copy_forward = 1
-        # Now we can check out.
+        vt.revertToVersion(content, old_id)
+        # Now we can check out, since the tool will remove the sticky tag
+        # without losing data.
         vt.checkout(content)
         content = self.root.content  # XXX ZopeVersionControl requires this