s3:pylibsmb: only use poll_mt backend if multi_threaded=True is specified
[garming/samba-autobuild/.git] / python / samba / tests / libsmb_samba_internal.py
index d883dae2fd74e3595a5044412ccc152cbb57fa49..db99c0bfb2bce5133d3bcfbc4bb5d7b73bbcb8c3 100644 (file)
@@ -26,6 +26,7 @@ import threading
 import sys
 import os
 
+
 class LibsmbTestCase(samba.tests.TestCase):
 
     class OpenClose(threading.Thread):
@@ -58,7 +59,8 @@ class LibsmbTestCase(samba.tests.TestCase):
         creds.set_username(os.getenv("USERNAME"))
         creds.set_password(os.getenv("PASSWORD"))
 
-        c = libsmb_samba_internal.Conn(os.getenv("SERVER_IP"), "tmp", creds)
+        c = libsmb_samba_internal.Conn(os.getenv("SERVER_IP"), "tmp",
+                                       creds, multi_threaded=True)
 
         mythreads = []
 
@@ -74,6 +76,7 @@ class LibsmbTestCase(samba.tests.TestCase):
             if t.exc:
                 raise t.exc[0](t.exc[1])
 
+
 if __name__ == "__main__":
     import unittest
     unittest.main()