Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-advanced-user-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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-advanced-user-tools
Commits
1f390715
Commit
1f390715
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Plain Diff
Merge branch 'f-fix-has-parent' into 'dev'
F fix has parent See merge request
!67
parents
68d165ba
ddb04d91
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!69
Release v0.7.0
,
!67
F fix has parent
Pipeline
#33939
passed
2 years ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
unittests/test_json_schema_model_parser.py
+4
-4
4 additions, 4 deletions
unittests/test_json_schema_model_parser.py
with
4 additions
and
4 deletions
unittests/test_json_schema_model_parser.py
+
4
−
4
View file @
1f390715
...
...
@@ -164,7 +164,7 @@ def test_enum():
assert
isinstance
(
model
[
name
],
db
.
Record
)
assert
model
[
name
].
name
==
name
assert
len
(
model
[
name
].
parents
)
==
1
assert
model
[
name
].
has_parent
(
model
[
"
license
"
])
assert
model
[
name
].
has_parent
(
model
[
"
license
"
]
,
retrieve
=
False
)
# Also allow enums with non-string types
number_enums
=
[
"
1.1
"
,
"
2.2
"
,
"
3.3
"
]
...
...
@@ -181,7 +181,7 @@ def test_enum():
assert
isinstance
(
model
[
name
],
db
.
Record
)
assert
model
[
name
].
name
==
name
assert
len
(
model
[
name
].
parents
)
==
1
assert
model
[
name
].
has_parent
(
model
[
"
number_enum
"
])
assert
model
[
name
].
has_parent
(
model
[
"
number_enum
"
]
,
retrieve
=
False
)
@pytest.mark.xfail
(
reason
=
"
Don
'
t allow integer enums until https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/issues/224 has been fixed
"
)
...
...
@@ -207,7 +207,7 @@ def test_int_enum():
assert
isinstance
(
model
[
name
],
db
.
Record
)
assert
model
[
name
].
name
==
name
assert
len
(
model
[
name
].
parents
)
==
1
assert
model
[
name
].
has_parent
(
model
[
"
int_enum
"
])
assert
model
[
name
].
has_parent
(
model
[
"
int_enum
"
]
,
retrieve
=
False
)
def
test_references
():
...
...
@@ -339,7 +339,7 @@ def test_list():
assert
isinstance
(
model
[
name
],
db
.
Record
)
assert
model
[
name
].
name
==
name
assert
len
(
model
[
name
].
parents
)
==
1
assert
model
[
name
].
has_parent
(
model
[
"
license
"
])
assert
model
[
name
].
has_parent
(
model
[
"
license
"
]
,
retrieve
=
False
)
def
test_name_property
():
...
...
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