当前位置: 首页>>代码示例>>Python>>正文


Python LdapCherry._deleteuser方法代码示例

本文整理汇总了Python中ldapcherry.LdapCherry._deleteuser方法的典型用法代码示例。如果您正苦于以下问题:Python LdapCherry._deleteuser方法的具体用法?Python LdapCherry._deleteuser怎么用?Python LdapCherry._deleteuser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ldapcherry.LdapCherry的用法示例。


在下文中一共展示了LdapCherry._deleteuser方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testAddUserOneBackend

# 需要导入模块: from ldapcherry import LdapCherry [as 别名]
# 或者: from ldapcherry.LdapCherry import _deleteuser [as 别名]
 def testAddUserOneBackend(self):
     app = LdapCherry()
     loadconf('./tests/cfg/ldapcherry_adldap.cfg', app)
     inv = ldapcherry.backend.backendAD.Backend(adcfg, cherrypy.log, u'test☭', adattr, 'sAMAccountName')
     inv.add_user(addefault_user.copy())
     form = {'groups': {}, 'attrs': {'password1': u'password☭P455', 'password2': u'password☭P455', 'cn': u'Test ☭ Test', 'name': u'Test ☭', 'uidNumber': u'1000', 'gidNumber': u'1000', 'home': u'/home/test', 'first-name': u'Test ☭', 'email': u'[email protected]', 'uid': u'☭default_user'}, 'roles': {'admin-lv3': u'on', 'admin-lv2': u'on', 'users': u'on'}}
     app._adduser(form)
     app._deleteuser(u'☭default_user')
开发者ID:kakwa,项目名称:ldapcherry,代码行数:10,代码来源:test_LdapCherry.py

示例2: testModifUser

# 需要导入模块: from ldapcherry import LdapCherry [as 别名]
# 或者: from ldapcherry.LdapCherry import _deleteuser [as 别名]
 def testModifUser(self):
     app = LdapCherry()
     loadconf('./tests/cfg/ldapcherry_test.ini', app)
     form = {'groups': {}, 'attrs': {'password1': u'password☭', 'password2': u'password☭', 'cn': u'Test ☭ Test', 'name': u'Test ☭', 'uidNumber': u'1000', 'gidNumber': u'1000', 'home': u'/home/test', 'first-name': u'Test ☭', 'email': u'[email protected]', 'uid': u'test'}, 'roles': {'admin-lv3': u'on', 'admin-lv2': u'on', 'users': u'on'}}
     app._adduser(form)
     modify_form = { 'attrs': {'first-name': u'Test42 ☭', 'uid': u'test'}, 'roles': { 'admin-lv3': u'on'}}
     app._modify(modify_form)
     app._deleteuser('test')
开发者ID:kakwa,项目名称:ldapcherry,代码行数:10,代码来源:test_LdapCherry.py

示例3: testModifyUserOneBackend

# 需要导入模块: from ldapcherry import LdapCherry [as 别名]
# 或者: from ldapcherry.LdapCherry import _deleteuser [as 别名]
 def testModifyUserOneBackend(self):
     app = LdapCherry()
     loadconf('./tests/cfg/ldapcherry_adldap.cfg', app)
     inv = ldapcherry.backend.backendAD.Backend(adcfg, cherrypy.log, u'test☭', adattr, 'sAMAccountName')
     try:
         app._deleteuser(u'☭default_user')
     except:
         pass
     inv.add_user(addefault_user.copy())
     modify_form = { 'attrs': {'first-name': u'Test42 ☭', 'uid': u'☭default_user'}, 'roles': { 'admin-lv3': u'on'}}
     app._modify(modify_form)
     app._deleteuser(u'☭default_user')
开发者ID:kakwa,项目名称:ldapcherry,代码行数:14,代码来源:test_LdapCherry.py

示例4: testNaughtyStrings

# 需要导入模块: from ldapcherry import LdapCherry [as 别名]
# 或者: from ldapcherry.LdapCherry import _deleteuser [as 别名]
 def testNaughtyStrings(self):
     app = LdapCherry()
     loadconf('./tests/cfg/ldapcherry_test.ini', app)
     with open('./tests/cfg/blns.json') as data_file:
         data = json.load(data_file)
     for attr in data:
         print('testing: ' + attr)
         # delete whatever is happening...
         try:
             app._deleteuser('test')
         except:
             pass
         form = {'groups': {}, 'attrs': {'password1': u'password☭', 'password2': u'password☭', 'cn': 'Test', 'name': attr, 'uidNumber': u'1000', 'gidNumber': u'1000', 'home': u'/home/test', 'first-name': u'Test ☭', 'email': u'[email protected]', 'uid': 'test'}, 'roles': {'admin-lv3': u'on', 'admin-lv2': u'on', 'users': u'on'}}
         app._adduser(form)
         page = app.searchuser('test'),
         app._deleteuser('test')
         htmlvalidator(page[0])
开发者ID:kakwa,项目名称:ldapcherry,代码行数:19,代码来源:test_LdapCherry.py

示例5: testDeleteUserOneBackend

# 需要导入模块: from ldapcherry import LdapCherry [as 别名]
# 或者: from ldapcherry.LdapCherry import _deleteuser [as 别名]
 def testDeleteUserOneBackend(self):
     app = LdapCherry()
     loadconf('./tests/cfg/ldapcherry_adldap.cfg', app)
     inv = ldapcherry.backend.backendAD.Backend(adcfg, cherrypy.log, u'test☭', adattr, 'sAMAccountName')
     inv.add_user(addefault_user.copy())
     app._deleteuser(u'☭default_user')
开发者ID:kakwa,项目名称:ldapcherry,代码行数:8,代码来源:test_LdapCherry.py


注:本文中的ldapcherry.LdapCherry._deleteuser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。