summaryrefslogtreecommitdiff
path: root/lib/tdb/python
diff options
context:
space:
mode:
authorKirill Smelkov <kirr@landau.phys.spbu.ru>2010-09-19 09:34:33 -0700
committerJelmer Vernooij <jelmer@samba.org>2010-09-19 09:34:33 -0700
commitb826ef9697c4bd236b6d861712fa1e450157bc6f (patch)
tree7de1d69cf485a9913ae5930e6d9b8d5ace305d62 /lib/tdb/python
parenta2621034e985c87f87f7b196b75da56ffe8948dc (diff)
downloadsamba-b826ef9697c4bd236b6d861712fa1e450157bc6f.tar.gz
samba-b826ef9697c4bd236b6d861712fa1e450157bc6f.tar.bz2
samba-b826ef9697c4bd236b6d861712fa1e450157bc6f.zip
pytdb: Add support for tdb_enable_seqnum, tdb_get_seqnum and tdb_increment_seqnum_nonblock
Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'lib/tdb/python')
-rw-r--r--lib/tdb/python/tests/simple.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tdb/python/tests/simple.py b/lib/tdb/python/tests/simple.py
index 258a486f91..abc888c4ed 100644
--- a/lib/tdb/python/tests/simple.py
+++ b/lib/tdb/python/tests/simple.py
@@ -135,6 +135,13 @@ class SimpleTdbTests(TestCase):
self.tdb.clear()
self.assertEquals(0, len(list(self.tdb)))
+ def test_seqnum(self):
+ self.tdb.enable_seqnum()
+ seq1 = self.tdb.seqnum
+ self.tdb.increment_seqnum_nonblock()
+ seq2 = self.tdb.seqnum
+ self.assertEquals(seq2-seq1, 1)
+
def test_len(self):
self.assertEquals(0, len(list(self.tdb)))
self.tdb["entry"] = "value"