aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-28 11:13:49 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-28 11:13:49 -0500
commit2d6ed9ec7181ef805f305c6c8b7152c1b9ec6ec8 (patch)
tree8f9ca159d11eb946109605cc4783570a8c495014
parente2b648f2148d7b6550fb3a4bcfde4eff714a7ec6 (diff)
downloadbugseverywhere-2d6ed9ec7181ef805f305c6c8b7152c1b9ec6ec8.tar.gz
Added VersionedStorage_commit_TestCase.test_commit_revision_ids()
-rw-r--r--libbe/storage/base.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/libbe/storage/base.py b/libbe/storage/base.py
index d99c22c..9807d86 100644
--- a/libbe/storage/base.py
+++ b/libbe/storage/base.py
@@ -827,6 +827,29 @@ if TESTING == True:
"%s.get() returned %s not %s for revision %s"
% (vars(self.Class)['name'], ret, val(i), revs[i]))
+ def test_get_previous_children(self):
+ """
+ Children list should be revision dependent.
+ """
+ self.s.add('parent', directory=True)
+ revs = []
+ cur_children = []
+ children = []
+ for i in range(10):
+ new_child = str(i)
+ self.s.add(new_child, 'parent', directory=False)
+ self.s.set(new_child, self.val)
+ revs.append(self.s.commit('%s: %d' % (self.commit_msg, i),
+ self.commit_body))
+ cur_children.append(new_child)
+ children.append(list(cur_children))
+ for i in range(10):
+ ret = self.s.children('parent', revision=revs[i])
+ self.failUnless(ret == children[i],
+ "%s.get() returned %s not %s for revision %s"
+ % (vars(self.Class)['name'], ret,
+ children[i], revs[i]))
+
def make_storage_testcase_subclasses(storage_class, namespace):
"""Make StorageTestCase subclasses for storage_class in namespace."""
storage_testcase_classes = [