Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CaosDB Python Integration Tests
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 Python Integration Tests
Commits
0fa46a75
Commit
0fa46a75
authored
1 year ago
by
florian
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into f-query-paging
parents
7aefc350
29cdcc51
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!65
TST: page_length parameter
Pipeline
#41566
passed
1 year ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_issues_server.py
+25
-2
25 additions, 2 deletions
tests/test_issues_server.py
tests/test_messages.py
+3
-3
3 additions, 3 deletions
tests/test_messages.py
with
28 additions
and
5 deletions
tests/test_issues_server.py
+
25
−
2
View file @
0fa46a75
...
...
@@ -27,9 +27,10 @@ import tempfile
import
time
import
caosdb
as
db
from
caosdb
import
administration
as
admin
import
pytest
from
caosdb.exceptions
import
TransactionError
,
HTTPClientError
from
caosdb
import
administration
as
admin
from
caosdb.exceptions
import
(
TransactionError
,
HTTPClientError
)
CURATOR_ROLE
=
"
curator
"
...
...
@@ -1432,3 +1433,25 @@ See https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/issues/106
# Existing Property should still be reported as TEXT
assert
db
.
Record
(
id
=
r
.
id
).
retrieve
().
get_property
(
"
prop
"
).
datatype
==
db
.
TEXT
@pytest.mark.xfail
(
reason
=
"
https://gitlab.com/caosdb/caosdb-server/-/issues/235
"
)
def
test_235_long_name
():
"""
Should give an appropriate error, not just unknown server/-/issues.
"""
length
=
10256
name
=
"
N
"
*
length
rt1
=
db
.
RecordType
(
name
=
name
)
try
:
rt1
.
insert
()
except
Exception
as
exc
:
assert
type
(
exc
)
is
not
db
.
HTTPServerError
# TODO more specific error should be asserted
rt2
=
db
.
RecordType
(
name
=
"
Short
"
)
rt2
.
insert
()
rt2
.
name
=
name
try
:
rt2
.
update
()
except
Exception
as
exc
:
assert
type
(
exc
)
is
not
db
.
HTTPServerError
# TODO more specific error should be asserted
This diff is collapsed.
Click to expand it.
tests/test_messages.py
+
3
−
3
View file @
0fa46a75
...
...
@@ -31,7 +31,7 @@ def test_messages_dict_behavior():
from
caosdb.common.models
import
Message
,
Messages
msgs
=
_
Messages
()
msgs
=
Messages
()
# create Message
msg
=
Message
(
...
...
@@ -40,10 +40,10 @@ def test_messages_dict_behavior():
description
=
"
Greeting the world
"
,
body
=
"
Hello, world!
"
)
# append it to the
_
Messages
# append it to the Messages
msgs
.
append
(
msg
)
# use
_
Messages as list of Message objects
# use Messages as list of Message objects
for
m
in
msgs
:
assert
isinstance
(
m
,
Message
)
...
...
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