summaryrefslogtreecommitdiff
path: root/lib/tdb/python
diff options
context:
space:
mode:
authorKirill Smelkov <kirr@mns.spb.ru>2010-09-19 13:53:20 +0400
committerJelmer Vernooij <jelmer@samba.org>2010-09-19 09:31:08 -0700
commitc4b1971259638875317aa991b6a119b668ac03a8 (patch)
treeed225ad1d9bb1d483d7e0509516a0a3d6a5e1d74 /lib/tdb/python
parent92eccf89a188702b79d9f4ac59f2ff4c5c7aeaac (diff)
downloadsamba-c4b1971259638875317aa991b6a119b668ac03a8.tar.gz
samba-c4b1971259638875317aa991b6a119b668ac03a8.tar.bz2
samba-c4b1971259638875317aa991b6a119b668ac03a8.zip
pytdb: Add support for tdb_add_flags() & tdb_remove_flags()
Note, unlike tdb_open where flags is `int', tdb_{add,remove}_flags want flags as `unsigned', so instead of "i" I used "I" in PyArg_ParseTuple. Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'lib/tdb/python')
-rw-r--r--lib/tdb/python/tests/simple.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tdb/python/tests/simple.py b/lib/tdb/python/tests/simple.py
index 6b1e840f32..5db824753b 100644
--- a/lib/tdb/python/tests/simple.py
+++ b/lib/tdb/python/tests/simple.py
@@ -132,6 +132,10 @@ class SimpleTdbTests(TestCase):
self.tdb["entry"] = "value"
self.assertEquals(1, len(list(self.tdb)))
+ def test_add_flags(self):
+ self.tdb.add_flags(tdb.NOMMAP)
+ self.tdb.remove_flags(tdb.NOMMAP)
+
if __name__ == '__main__':
import unittest