Пересмешка с помощью ldap3: TypeError: объект NotImplementedType не вызывается

Я пытаюсь запустить пример для насмешек с ldap3 из документации:

$ python3
Python 3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ldap3 import Server, Connection, MOCK_SYNC
>>> server = Server('my_fake_server')
>>> connection = Connection(server, user='cn=my_user,ou=test,o=lab',password='my_password',client_strategy=MOCK_SYNC)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/ldap3/core/connection.py", line 270, in __init__
    self.strategy = MockSyncStrategy(self)
TypeError: 'NotImplementedType' object is not callable

Кто-нибудь знает, почему это не удается?

0 ответов

Другие вопросы по тегам