summaryrefslogtreecommitdiff
path: root/lib/ldb/tests/python/api.py
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2024-03-20 11:31:23 +1300
committerAndrew Bartlett <abartlet@samba.org>2024-04-10 05:13:32 +0000
commit8612b3e38b3c64a6645c460ccdca52d059eeb75b (patch)
tree5dda97c7d9f921ab6bc6cb000febab5ecee3f21e /lib/ldb/tests/python/api.py
parentfdc3212275bc08f4a016e10923e689192ea7697f (diff)
downloadsamba-8612b3e38b3c64a6645c460ccdca52d059eeb75b.tar.gz
samba-8612b3e38b3c64a6645c460ccdca52d059eeb75b.tar.bz2
samba-8612b3e38b3c64a6645c460ccdca52d059eeb75b.zip
ldb:pytests: test ldb.connect() works after .disconnect()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/ldb/tests/python/api.py')
-rwxr-xr-xlib/ldb/tests/python/api.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index 866bfb0f751..88dfa8c3b71 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -138,6 +138,15 @@ class SimpleLdb(LdbBaseTest):
with self.assertRaises(ldb.LdbError):
x.connect(url, flags)
+ def test_connect_and_disconnect(self):
+ url = self.url()
+ flags = self.flags()
+ x = ldb.Ldb()
+ x.connect(url, flags)
+ x.disconnect()
+ x.connect(url, flags)
+ x.disconnect()
+
def test_repr(self):
x = ldb.Ldb()
self.assertTrue(repr(x).startswith("<ldb connection"))