Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
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-pylib
Commits
a68883c4
Commit
a68883c4
authored
3 years ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
TST: adapted test to use member function instead of copy_entity
parent
f3622f43
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!57
RELEASE 0.7.3
,
!45
F copy entity
Pipeline
#21658
passed with warnings
3 years ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
unittests/test_apiutils.py
+4
-3
4 additions, 3 deletions
unittests/test_apiutils.py
with
4 additions
and
3 deletions
unittests/test_apiutils.py
+
4
−
3
View file @
a68883c4
...
...
@@ -31,7 +31,7 @@ import tempfile
import
caosdb
as
db
import
caosdb.apiutils
from
caosdb.apiutils
import
(
apply_to_ids
,
compare_entities
,
create_id_query
,
resolve_reference
,
copy_entity
,
merge_entities
)
resolve_reference
,
merge_entities
)
from
.test_property
import
testrecord
...
...
@@ -241,10 +241,11 @@ def test_copy_entities():
r
.
add_property
(
name
=
"
D
"
,
value
=
[
3
,
4
,
7
],
importance
=
"
OBLIGATORY
"
)
r
.
description
=
"
A fancy test record
"
c
=
copy
_entity
(
r
)
c
=
r
.
copy
(
)
assert
c
!=
r
assert
c
is
not
r
assert
c
.
name
==
"
A
"
assert
c
.
role
==
r
.
role
assert
c
.
parents
[
0
].
name
==
"
B
"
# Currently parents and properties are always individual to a copy:
assert
c
.
parents
[
0
]
!=
r
.
parents
[
0
]
...
...
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