Commit 7f200b9d authored by Barry Warsaw's avatar Barry Warsaw

checkGetSerial(): New test for getSerial() in a non-version aware

situation.
parent ece17079
...@@ -142,3 +142,15 @@ class BasicStorage: ...@@ -142,3 +142,15 @@ class BasicStorage:
revid3 = self._dostore(oid1, revid=revid1, data=p32) revid3 = self._dostore(oid1, revid=revid1, data=p32)
revid4 = self._dostore(oid2, revid=revid2, data=p52) revid4 = self._dostore(oid2, revid=revid2, data=p52)
noteq(revid3, revid4) noteq(revid3, revid4)
def checkGetSerial(self):
eq = self.assertEqual
p41, p42 = map(MinPO, (41, 42))
oid = self._storage.new_oid()
self.assertRaises(KeyError, self._storage.getSerial, oid)
# Now store a revision
revid1 = self._dostore(oid, data=p41)
eq(revid1, self._storage.getSerial(oid))
# And another one
revid2 = self._dostore(oid, revid=revid1, data=p42)
eq(revid2, self._storage.getSerial(oid))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment