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
4310a719
Verified
Commit
4310a719
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
TST: test for
https://gitlab.indiscale.com/caosdb/customers/glaz_awi/management/-/issues/230
parent
63f3868a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#21730
passed with warnings
3 years ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_name_properties.py
+23
-1
23 additions, 1 deletion
tests/test_name_properties.py
with
23 additions
and
1 deletion
tests/test_name_properties.py
+
23
−
1
View file @
4310a719
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
"""
"""
import
caosdb
as
db
import
caosdb
as
db
from
pytest
import
raises
from
pytest
import
raises
,
mark
from
nose.tools
import
assert_true
,
assert_equal
from
nose.tools
import
assert_true
,
assert_equal
...
@@ -351,3 +351,25 @@ def test_query_with_back_reference():
...
@@ -351,3 +351,25 @@ def test_query_with_back_reference():
"
FIND TestPerson WHICH IS REFERENCED BY TestObservation AS A TestConductor
"
,
"
FIND TestPerson WHICH IS REFERENCED BY TestObservation AS A TestConductor
"
,
unique
=
True
).
id
,
unique
=
True
).
id
,
rec
.
id
)
rec
.
id
)
@mark.xfail
(
reason
=
"
Enhancement proposed
"
)
def
test_name_resource
():
name_prop
=
db
.
Property
(
name
=
"
name
"
).
retrieve
()
alias_prop
=
db
.
Property
(
name
=
"
TestAlias
"
).
add_parent
(
name_prop
).
insert
()
rt
=
db
.
RecordType
(
name
=
"
TestRT_primary
"
).
add_property
(
alias_prop
,
value
=
"
TestRT_alias
"
).
insert
();
connection
=
db
.
get_connection
()
flags
=
{
"
names
"
:
None
}
http_response
=
connection
.
retrieve
(
entity_uri_segments
=
[
"
Entity
"
],
query_dict
=
flags
)
result
=
db
.
Container
.
_response_to_entities
(
http_response
)
print
(
result
)
names
=
[
e
.
name
for
e
in
result
]
assert
"
TestRT_primary
"
in
names
assert
"
TestRT_alias
"
in
names
## the alias should also be included"
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