Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
a09314a1
Commit
a09314a1
authored
4 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
doc
parent
6d37e6ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
unittests/test_authentication_plain.py
+6
-0
6 additions, 0 deletions
unittests/test_authentication_plain.py
unittests/test_connection.py
+4
-0
4 additions, 0 deletions
unittests/test_connection.py
with
10 additions
and
0 deletions
unittests/test_authentication_plain.py
+
6
−
0
View file @
a09314a1
...
...
@@ -33,6 +33,12 @@ from pytest import raises
def
test_subclass_configure
():
# TODO I do not see the meaning of this test.
#It only tests, that the call of the super version of configure sets the
#password property. And that due to the subclassing no longer a password
# argument can be provided.
# Suggestion: Either remove this test or state in what context this test
# is meanigful.
"""
Test the correct passing of the password argument.
"""
class
SubClassOf
(
PlainTextCredentialsProvider
):
"""
A simple subclass of PlainTextCredentialsProvider.
"""
...
...
This diff is collapsed.
Click to expand it.
unittests/test_connection.py
+
4
−
0
View file @
a09314a1
...
...
@@ -157,6 +157,7 @@ def test_init_response():
response
=
MockUpResponse
(
status
=
200
,
headers
=
{
"
sessionToken
"
:
"
SessionToken
"
},
body
=
"
Body
"
)
there
(
response
)
return
response
...
...
@@ -180,6 +181,7 @@ def test_getter_session_token():
def
test_init_connection
():
connection
=
MockUpServerConnection
()
there
(
connection
)
return
connection
...
...
@@ -189,6 +191,7 @@ def test_resources_list():
assert
len
(
connection
.
resources
)
==
1
connection
.
resources
.
append
(
lambda
**
kwargs
:
test_init_response
())
assert
len
(
connection
.
resources
)
==
2
return
connection
...
...
@@ -219,6 +222,7 @@ def setup_two_resources():
connection
=
test_init_connection
()
connection
.
resources
.
extend
([
r1
,
r2
,
r3
])
return
connection
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment