Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Fachschaftsrat Physik TUKL
Protokoll
protokoll_skript
Commits
3b051d79
Verified
Commit
3b051d79
authored
Mar 08, 2019
by
Lorenz Steinert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tests
parent
2558c661
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
bin/module/test.py
bin/module/test.py
+9
-9
No files found.
bin/module/test.py
View file @
3b051d79
...
...
@@ -72,7 +72,7 @@ class FsrLdapTest(unittest.TestCase):
"""test the get_fsr_extern_ldap function"""
self
.
assertEqual
(
self
.
ldap_server
.
_get_fsr_extern_ldap
(),
[
'testing test2'
])
self
.
assertEqual
(
self
.
info
,
[
'Fetching
E
FSR from LDAP ...'
,
'Done'
])
self
.
assertEqual
(
self
.
info
,
[
'Fetching
e
FSR from LDAP ...'
,
'Done'
])
self
.
assertEqual
(
self
.
warning
,
[])
def
test_get_protokollant_ldap
(
self
):
...
...
@@ -139,7 +139,7 @@ class FsrLdapTest(unittest.TestCase):
self
.
ldap_server
.
conn
.
search
=
self
.
ldap_search_fail
self
.
assertEqual
(
self
.
ldap_server
.
_get_fsr_extern_ldap
(),
esme
.
Error
.
UNSEC_SEARCH
)
self
.
assertEqual
(
self
.
info
,
[
'Fetching
E
FSR from LDAP ...'
])
self
.
assertEqual
(
self
.
info
,
[
'Fetching
e
FSR from LDAP ...'
])
self
.
assertEqual
(
self
.
warning
,
[])
def
test_get_protokollant_ldap_no_server
(
self
):
...
...
@@ -158,16 +158,16 @@ class FsrLdapTest(unittest.TestCase):
esme
.
Error
.
LDAP_FAIL
)
self
.
assertEqual
(
self
.
info
,
[
'Fetching FSR from LDAP ...'
])
self
.
assertEqual
(
self
.
warning
,
[
"Couldn't Connect to
ldap
. Using fallback
F
ile."
])
[
"Couldn't Connect to
the LDAP-Server
. Using fall
-
back
f
ile."
])
def
test_get_fsr_extern_ldap_ldap_exception
(
self
):
"""test the get_fsr_extern_ldap function with a LDAPException"""
self
.
ldap_server
.
conn
.
search
=
self
.
ldap_exception
self
.
assertEqual
(
self
.
ldap_server
.
_get_fsr_extern_ldap
()[
0
],
esme
.
Error
.
LDAP_FAIL
)
self
.
assertEqual
(
self
.
info
,
[
'Fetching
E
FSR from LDAP ...'
])
self
.
assertEqual
(
self
.
info
,
[
'Fetching
e
FSR from LDAP ...'
])
self
.
assertEqual
(
self
.
warning
,
[
"Couldn't
C
onnect to
ldap
. Using fallback
F
ile."
])
[
"Couldn't
c
onnect to
the LDAP-Server
. Using fall
-
back
f
ile."
])
def
test_get_protokollant_ldap_ldap_exception
(
self
):
"""test the get_protokollant_ldap function with a LDAPException"""
...
...
@@ -177,7 +177,7 @@ class FsrLdapTest(unittest.TestCase):
esme
.
Error
.
LDAP_FAIL
)
self
.
assertEqual
(
self
.
info
,
[
'Fetching Protokollant from LDAP ...'
])
self
.
assertEqual
(
self
.
warning
,
[
"Couldn't Connect to
ldap
. Using fallback default."
])
[
"Couldn't Connect to
the LDAP-Server
. Using fall
-
back default."
])
def
tearDown
(
self
):
"""cleanup after the tests"""
...
...
@@ -270,7 +270,7 @@ class GetFuncTest(unittest.TestCase):
self
.
assertEqual
(
self
.
info
,
[])
self
.
assertEqual
(
self
.
warning
,
[
'No non default ini file found using default file.'
,
'No ini file found. Using hardcoded defaults.'
])
'No ini file found. Using hard
cod
d
ed defaults.'
])
def
test_get_share
(
self
):
"""test the get_share function"""
...
...
@@ -315,7 +315,7 @@ class GetFuncTest(unittest.TestCase):
self
.
assertEqual
(
self
.
info
,
[])
self
.
assertEqual
(
self
.
warning
,
[
'No LDAP Server supplied. '
+
'Tr
i
ing to use "rincwind.fs.physik.uni-kl.de".'
])
+
'Tr
y
ing to use "rinc
e
wind.fs.physik.uni-kl.de".'
])
def
test_get_ldap_base
(
self
):
"""test the get_ldap_base function"""
...
...
@@ -329,7 +329,7 @@ class GetFuncTest(unittest.TestCase):
self
.
assertEqual
(
self
.
info
,
[])
self
.
assertEqual
(
self
.
warning
,
[
'No LDAP search base supplied. '
+
'Tr
i
ing to use "dc=fs,dc=physik,dc=uni-kl,dc=de".'
])
+
'Tr
y
ing to use "dc=fs,dc=physik,dc=uni-kl,dc=de".'
])
def
test_get_server_timeout
(
self
):
"""test the get_server_timeout function"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment