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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Python Integration Tests
Commits
2c2852f5
Verified
Commit
2c2852f5
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
REVERT changes in test_name_properties.py
parent
a589e03a
No related branches found
No related tags found
1 merge request
!36
Tests for user name requirements
Pipeline
#25152
passed
3 years ago
Stage: info
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_name_properties.py
+0
-27
0 additions, 27 deletions
tests/test_name_properties.py
with
0 additions
and
27 deletions
tests/test_name_properties.py
+
0
−
27
View file @
2c2852f5
...
@@ -353,33 +353,6 @@ def test_query_with_back_reference():
...
@@ -353,33 +353,6 @@ def test_query_with_back_reference():
rec
.
id
)
rec
.
id
)
@mark.xfail
(
reason
=
"
Enhancement proposed
"
)
def
test_obligatory_name
():
name_prop
=
db
.
Property
(
name
=
"
name
"
).
retrieve
()
rt
=
db
.
RecordType
(
name
=
"
TestType
"
).
add_property
(
name_prop
,
importance
=
db
.
OBLIGATORY
).
insert
()
print
(
rt
)
rt
=
db
.
RecordType
(
name
=
"
TestType
"
).
retrieve
()
print
(
rt
)
rec
=
db
.
Record
(
description
=
"
TestDesc
"
).
add_parent
(
"
TestType
"
)
with
raises
(
db
.
TransactionError
)
as
err
:
rec
.
insert
()
assert
err
.
value
.
has_error
(
db
.
EntityError
)
assert
rec
.
get_errors
()[
0
].
description
==
"
An obligatory property is missing.
"
rec
.
name
=
"
TestRec
"
rec
.
insert
()
# this should work
rec
.
add_property
(
"
name
"
,
value
=
"
TestRec
"
)
rec
.
insert
()
print
(
rec
)
assert
rt
is
None
name_prop
=
db
.
Property
(
name
=
"
name
"
).
retrieve
()
rt
=
db
.
RecordType
(
name
=
"
TestType
"
).
add_property
(
name_prop
,
importance
=
db
.
OBLIGATORY
).
insert
()
rec
=
db
.
Record
(
description
=
"
TestDesc
"
).
add_parent
(
"
TestType
"
).
add_property
(
"
name
"
,
value
=
"
TestRec
"
).
insert
()
@mark.xfail
(
reason
=
"
Enhancement proposed
"
)
@mark.xfail
(
reason
=
"
Enhancement proposed
"
)
def
test_name_resource
():
def
test_name_resource
():
name_prop
=
db
.
Property
(
name
=
"
name
"
).
retrieve
()
name_prop
=
db
.
Property
(
name
=
"
name
"
).
retrieve
()
...
...
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