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
ea6cd246
Commit
ea6cd246
authored
3 years ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Don't use name "1" for test property
parent
8f1a1506
No related branches found
No related tags found
2 merge requests
!39
Release 0.4.0
,
!33
F json schema datamodel
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
unittests/json-schema-models/datamodel_atomic_properties.schema.json
+2
-2
2 additions, 2 deletions
...son-schema-models/datamodel_atomic_properties.schema.json
unittests/test_json_schema_model_parser.py
+2
-2
2 additions, 2 deletions
unittests/test_json_schema_model_parser.py
with
4 additions
and
4 deletions
unittests/json-schema-models/datamodel_atomic_properties.schema.json
+
2
−
2
View file @
ea6cd246
...
...
@@ -6,9 +6,9 @@
"properties"
:
{
"title"
:
{
"type"
:
"string"
,
"description"
:
"full dataset title"
},
"campaign"
:
{
"type"
:
"string"
,
"description"
:
"FIXME"
},
"
1
"
:
{
"type"
:
"number"
,
"description"
:
"Some float property"
}
"
number_prop
"
:
{
"type"
:
"number"
,
"description"
:
"Some float property"
}
},
"required"
:
[
"title"
,
"
1
"
]
"required"
:
[
"title"
,
"
number_prop
"
]
},
{
"title"
:
"Dataset2"
,
...
...
This diff is collapsed.
Click to expand it.
unittests/test_json_schema_model_parser.py
+
2
−
2
View file @
ea6cd246
...
...
@@ -85,7 +85,7 @@ def test_datamodel_with_atomic_properties():
assert
rt1
.
get_property
(
"
title
"
)
is
not
None
assert
rt1
.
get_property
(
"
campaign
"
)
is
not
None
assert
rt1
.
get_property
(
"
1
"
)
is
not
None
assert
rt1
.
get_property
(
"
number_prop
"
)
is
not
None
title_prop
=
rt1
.
get_property
(
"
title
"
)
assert
title_prop
.
datatype
==
db
.
TEXT
...
...
@@ -95,7 +95,7 @@ def test_datamodel_with_atomic_properties():
assert
campaign_prop
.
datatype
==
db
.
TEXT
assert
rt1
.
get_importance
(
campaign_prop
.
name
)
==
db
.
RECOMMENDED
float_prop
=
rt1
.
get_property
(
"
1
"
)
float_prop
=
rt1
.
get_property
(
"
number_prop
"
)
assert
float_prop
.
datatype
==
db
.
DOUBLE
assert
rt1
.
get_importance
(
float_prop
.
name
)
==
db
.
OBLIGATORY
...
...
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