Commit Graph

43 Commits

Author SHA1 Message Date
kakwa baa3430e63 fix test and exception handling in code
With python 2 it was possible to do exception[0][...] to recover
details about an exception.
It's no longer authorized with python 3.
Now, we must do something like exception.args or exception.urls.
fortunately this syntax also works with python 2.
So we use it for both.
2019-02-09 17:12:39 +01:00
kakwa fc98b1bd70 fixing the test env deploy script + small fix in unit tests 2019-02-07 22:34:47 +01:00
kakwa 2a2864a306 porting the tests over to python3 2019-02-07 20:55:50 +01:00
kakwa 4bd6314b3b remove useless tests 2017-06-12 19:50:42 +02:00
kakwa 55ce2bec5e small cleaning 2017-03-16 02:40:23 +01:00
kakwa 7f00264e32 improve robustness if user dn attribute contains something like ,cn= 2016-07-31 12:21:26 +02:00
kakwa ff950dd88b more unicode testing 2016-07-28 19:53:32 +02:00
kakwa 6c3fb4975d fix many encoding errors on login and password 2016-07-07 20:22:33 +02:00
kakwa ecbf112677 fix unit test on duplicate user exception 2015-07-31 22:54:21 +02:00
kakwa efcaad54fc multiple modification/fix
* add display_name parameter for backend
* handle display_name in modify template (lonely groups) and error
  message
* fix bug in modify when user is in only one backend
* remove redondant exception in ad/ldap backend
* fix unit test accordingly
* fix License in AD backend (GPLv3 -> MIT, previously tought of using
  samba4 python library which is GPL, but this module finaly uses
  python-ldap which is MIT compatible)
2015-07-31 20:08:21 +02:00
kakwa 5d40cad342 adding utf-8 char in unit tests for ldap backend 2015-07-29 00:09:32 +02:00
kakwa df88f2f266 remove trailing spaces 2015-07-05 22:48:24 +02:00
kakwa 287ef63215 remove useless test 2015-07-05 22:30:11 +02:00
kakwa e9d5331d6a various fix on ssl/tls + tests
* making ssl cert check and cert no check works
* adding a test to check if the cafile does exist
* reenable and fix ssl checks on travis
2015-07-05 22:01:09 +02:00
kakwa 2d953030d5 adding various unit tests 2015-06-28 23:34:26 +02:00
kakwa a8f1b7be59 reverse because no effect + disable ssl unit test on travis 2015-06-18 00:23:00 +02:00
kakwa a3c75f97f5 adding unit test for starttls 2015-06-17 22:51:33 +02:00
kakwa 05a897f355 fix path to ca 2015-06-17 22:41:42 +02:00
kakwa c6ffdc20d8 reenable ssl no cert check 2015-06-17 22:20:21 +02:00
kakwa e029c6701b test for travis 2015-06-17 21:02:10 +02:00
kakwa 4321d48dc2 more logs 2015-06-17 20:51:21 +02:00
kakwa 567e4c7d5f greater timeout 2015-06-17 20:30:26 +02:00
kakwa c2288eecf5 fix unit test and fix the way ldap connexion options are handled 2015-06-17 19:22:57 +02:00
kakwa 42a1e13db4 adding test for add/delete groups 2015-06-17 00:39:03 +02:00
kakwa a7fcad01ed small reorganization 2015-06-17 00:06:30 +02:00
kakwa 47cddd04ca fix and add unit tests on ldap backend 2015-06-16 21:32:14 +02:00
kakwa c9b971e8b0 adding key handling 2015-05-31 18:40:35 +02:00
kakwa 1acd48c332 add unit test for get_user 2015-05-28 09:56:25 +02:00
kakwa 0f97d1d07c adding unit test for del user if user don't exist 2015-05-28 09:51:19 +02:00
kakwa 231b591d6a add unit test for get_groups 2015-05-27 21:56:55 +02:00
kakwa c093905015 fix test on ldap backend 2015-05-26 22:51:29 +02:00
kakwa a1c7a529d8 adding methods add_user and del_user
* adding add_user
* adding del_user
* adding unit tests
* adding configuration parameters for adding users
2015-05-26 00:33:36 +02:00
kakwa 0f6e0c7cab adding objectclasses options 2015-05-25 22:53:34 +02:00
kakwa 7a7d6f5f6f implementing search users
* adding search
* adding unit tests
2015-05-25 19:30:41 +02:00
kakwa 6af8628d5d adding search template 2015-05-25 18:52:14 +02:00
kakwa 63062be433 multiple changes
* implemeting recover user attributes
* adding a unit test for unavailable ldap
* adding a parameter timeout to set the ldap timeout connexion
2015-05-22 20:05:24 +02:00
kakwa 6460c33b28 adding unit test for ldap server unavailable 2015-05-22 19:38:41 +02:00
kakwa 3fe59e4349 add passing attributes list to backend 2015-05-22 10:27:46 +02:00
kakwa 31afad5ee9 implement unit test on auth test 2015-05-22 01:33:15 +02:00
kakwa 189079cf21 many fixes in unit tests + fix in params + fix in constant
Oh god, python-ldap is crap...
* add better unit test
* correct params name
* correct exception handling
* disable testConnectSSLNoCheck (impossible to test with a certificate
  previously defined)
2015-05-22 01:16:53 +02:00
kakwa 93ed190913 multiple changes
* change parameters name for Backend Ldap
* fix default value handling in backends get_param
* correct exception in backends get_param
* fix syntaxe error
* add backend name in test_BackendLdap.py
2015-05-21 21:40:13 +02:00
kakwa a8c61d33e6 partial testConnect implementation 2015-05-21 08:54:28 +02:00
kakwa b67e0112c5 adding skeleton for ldap backed 2015-05-21 08:33:56 +02:00