mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-04 20:37:48 +02:00
multiple modifications:
* adding logs in conf loading * fixing attributes/roles handling in class LdapCherry * fix unit test on logs * add unit test for random exception
This commit is contained in:
parent
b653f5512c
commit
6a610c079e
2 changed files with 34 additions and 3 deletions
|
@ -58,7 +58,7 @@ class TestError(object):
|
|||
cfg['global']['log.access_handler']=t
|
||||
cfg['global']['log.error_handler']=t
|
||||
app._set_access_log(cfg, logging.DEBUG)
|
||||
app._set_access_log(cfg, logging.DEBUG)
|
||||
app._set_error_log(cfg, logging.DEBUG)
|
||||
|
||||
def testMissingBackend(self):
|
||||
app = LdapCherry()
|
||||
|
@ -71,7 +71,6 @@ class TestError(object):
|
|||
else:
|
||||
raise AssertionError("expected an exception")
|
||||
|
||||
|
||||
def testMissingParameters(self):
|
||||
app = LdapCherry()
|
||||
try:
|
||||
|
@ -81,6 +80,12 @@ class TestError(object):
|
|||
else:
|
||||
raise AssertionError("expected an exception")
|
||||
|
||||
def testRandomException(self):
|
||||
app = LdapCherry()
|
||||
loadconf('./tests/cfg/ldapcherry.ini', app)
|
||||
e = Exception()
|
||||
app._handle_exception(e)
|
||||
|
||||
def testLogger(self):
|
||||
app = LdapCherry()
|
||||
loadconf('./tests/cfg/ldapcherry.ini', app)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue