Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
788ab223
Commit
788ab223
authored
5 years ago
by
Swen Vermeul
Browse files
Options
Downloads
Patches
Plain Diff
sample.space no longer returns a code only, but the space object. Changed test accordingly
parent
31ee5160
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pybis/src/python/tests/test_sample.py
+5
-6
5 additions, 6 deletions
pybis/src/python/tests/test_sample.py
with
5 additions
and
6 deletions
pybis/src/python/tests/test_sample.py
+
5
−
6
View file @
788ab223
...
@@ -20,10 +20,9 @@ def test_create_delete_sample(space):
...
@@ -20,10 +20,9 @@ def test_create_delete_sample(space):
sample_code
=
'
test_sample_
'
+
timestamp
sample_code
=
'
test_sample_
'
+
timestamp
sample
=
o
.
new_sample
(
code
=
sample_code
,
type
=
sample_type
,
space
=
space
)
sample
=
o
.
new_sample
(
code
=
sample_code
,
type
=
sample_type
,
space
=
space
)
assert
sample
is
not
None
assert
sample
is
not
None
assert
sample
.
space
==
space
assert
sample
.
space
.
code
==
space
.
code
assert
sample
.
code
==
sample_code
assert
sample
.
code
==
sample_code
assert
sample
.
permId
==
''
assert
sample
.
permId
is
None
sample
.
save
()
sample
.
save
()
# now there should appear a permId
# now there should appear a permId
...
@@ -58,7 +57,7 @@ def test_create_delete_space_sample(space):
...
@@ -58,7 +57,7 @@ def test_create_delete_space_sample(space):
sample
=
space
.
new_sample
(
code
=
sample_code
,
type
=
sample_type
)
sample
=
space
.
new_sample
(
code
=
sample_code
,
type
=
sample_type
)
assert
sample
is
not
None
assert
sample
is
not
None
assert
sample
.
space
==
space
assert
sample
.
space
.
code
==
space
.
code
assert
sample
.
code
==
sample_code
assert
sample
.
code
==
sample_code
sample
.
save
()
sample
.
save
()
assert
sample
.
permId
is
not
None
assert
sample
.
permId
is
not
None
...
@@ -79,11 +78,11 @@ def test_parent_child(space):
...
@@ -79,11 +78,11 @@ def test_parent_child(space):
ex_sample_parents
=
sample_child
.
get_parents
()
ex_sample_parents
=
sample_child
.
get_parents
()
ex_sample_parent
=
ex_sample_parents
[
0
]
ex_sample_parent
=
ex_sample_parents
[
0
]
assert
ex_sample_parent
.
identifier
==
'
/
DEFAULT
/{}
'
.
format
(
parent_code
).
upper
()
assert
ex_sample_parent
.
identifier
==
'
/
{}
/{}
'
.
format
(
space
.
code
,
parent_code
).
upper
()
ex_sample_children
=
ex_sample_parent
.
get_children
()
ex_sample_children
=
ex_sample_parent
.
get_children
()
ex_sample_child
=
ex_sample_children
[
0
]
ex_sample_child
=
ex_sample_children
[
0
]
assert
ex_sample_child
.
identifier
==
'
/
DEFAULT
/{}
'
.
format
(
child_code
).
upper
()
assert
ex_sample_child
.
identifier
==
'
/
{}
/{}
'
.
format
(
space
.
code
,
child_code
).
upper
()
sample_parent
.
delete
(
'
sample parent-child creation test on
'
+
timestamp
)
sample_parent
.
delete
(
'
sample parent-child creation test on
'
+
timestamp
)
sample_child
.
delete
(
'
sample parent-child creation test on
'
+
timestamp
)
sample_child
.
delete
(
'
sample parent-child creation test on
'
+
timestamp
)
...
...
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