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
cda49965
Commit
cda49965
authored
5 months ago
by
I. Nüske
Browse files
Options
Downloads
Patches
Plain Diff
TST: Add test for
https://gitlab.com/linkahead/linkahead-pylib/-/issues/123
and update changelog
parent
aeacf439
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!87
Test for https://gitlab.com/linkahead/linkahead-pylib/-/issues/123
Pipeline
#58771
failed
5 months ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
tests/test_issues_pylib.py
+22
-0
22 additions, 0 deletions
tests/test_issues_pylib.py
with
23 additions
and
0 deletions
CHANGELOG.md
+
1
−
0
View file @
cda49965
...
...
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added (for new features)
*
Test for
[
linkahead-pylib#123
](
https://gitlab.com/linkahead/linkahead-pylib/-/issues/123
)
*
Tests for
[
linkahead-server#280
](
https://gitlab.com/linkahead/linkahead-server/-/issues/280
)
*
Test for
[
caosdb-pylib#119
](
https://gitlab.com/linkahead/linkahead-pylib/-/issues/119
)
*
Test for
[
caosdb-pylib#89
](
https://gitlab.com/linkahead/linkahead-pylib/-/issues/89
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_issues_pylib.py
+
22
−
0
View file @
cda49965
...
...
@@ -196,3 +196,25 @@ def test_gitlab_com_120():
rt1_retrieved
.
update
()
# The update and addition of a new property must not change this, either.
assert
len
(
rt1_retrieved
.
get_property
(
rt2
.
name
).
properties
)
==
0
def
test_gitlab_com_123
():
"""
Test that Entity Role is taken into account when retrieving entities with
ambiguous name.
See https://gitlab.com/linkahead/linkahead-pylib/-/issues/123.
"""
# Create ambiguous situation
db
.
RecordType
(
name
=
"
TestUniquenessRecordType
"
).
insert
()
f
=
db
.
File
(
file
=
"
__init__.py
"
,
path
=
"
__init__.py
"
)
f
.
insert
()
f
.
name
=
"
TestUniquenessRecordType
"
f
.
update
(
unique
=
False
)
# Check that only the file is retrieved and unique retrieve works
cont
=
db
.
File
(
"
TestUniquenessRecordType
"
).
retrieve
(
unique
=
False
)
assert
len
(
cont
)
==
1
file
=
db
.
File
(
"
TestUniquenessRecordType
"
).
retrieve
()
assert
file
.
role
==
"
File
"
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