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
e4c6cc19
Verified
Commit
e4c6cc19
authored
10 months ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
TEST: test_issues_server.py::test_258_name_too_long
Current behavior: Unexpected server error when name is too long.
parent
b76520f9
Branches
Branches containing commit
Tags
caosdb-pylib-v0.15.0
Tags containing commit
No related merge requests found
Pipeline
#56752
passed
6 months ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Stage: deploy
Changes
1
Pipelines
210
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_issues_server.py
+24
-1
24 additions, 1 deletion
tests/test_issues_server.py
with
24 additions
and
1 deletion
tests/test_issues_server.py
+
24
−
1
View file @
e4c6cc19
...
...
@@ -30,7 +30,11 @@ import linkahead as db
import
pytest
from
linkahead
import
administration
as
admin
from
linkahead.exceptions
import
(
TransactionError
,
HTTPClientError
,
HTTPURITooLongError
)
from
linkahead.exceptions
import
(
TransactionError
,
HTTPClientError
,
HTTPURITooLongError
,
)
CURATOR_ROLE
=
"
curator
"
...
...
@@ -1508,6 +1512,25 @@ def test_253():
assert
len
(
results
)
==
0
@pytest.mark.xfail
(
reason
=
"
https://gitlab.com/linkahead/linkahead-server/-/issues/258
"
)
def
test_258_name_too_long
():
"""
Unexpected server error when name is too long.
"""
test_name_short
=
[
"
0123456789
"
,
"
0123456789
"
*
25
,
]
test_name_long
=
[
"
0123456789
"
*
26
,
]
for
name
in
test_name_short
:
ent
=
db
.
RecordType
(
name
=
name
).
insert
()
assert
ent
.
id
>
0
for
name
in
test_name_long
:
with
pytest
.
raises
(
TransactionError
)
as
tre
:
db
.
RecordType
(
name
=
name
).
insert
()
assert
"
too long
"
in
str
(
tre
.
value
)
@pytest.mark.xfail
(
reason
=
"
https://gitlab.com/linkahead/linkahead-server/-/issues/260
"
)
def
test_260_datetime_without_date
():
"""
Only time value in datetime property must not cause an unexpected server
...
...
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