Skip to content
Snippets Groups Projects
Verified Commit 2524bbf3 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

WIP: Pipeline fixing.

parent cb9b86f6
No related branches found
No related tags found
2 merge requests!39Release 0.4.0,!35Pipeline streamlining
Pipeline #19893 failed
...@@ -48,7 +48,8 @@ Optional h5-crawler: ...@@ -48,7 +48,8 @@ Optional h5-crawler:
`integrationtest/extroot/` directory. `integrationtest/extroot/` directory.
## Code Formatting ## Code Formatting
`autopep8 -i -r ./`
`make style`
## Documentation # ## Documentation #
......
...@@ -32,26 +32,25 @@ from caosadvancedtools.cfood import (assure_object_is_in_list) ...@@ -32,26 +32,25 @@ from caosadvancedtools.cfood import (assure_object_is_in_list)
from caosadvancedtools.guard import (global_guard, RETRIEVE, UPDATE) from caosadvancedtools.guard import (global_guard, RETRIEVE, UPDATE)
def setup_module(): def setup():
"""Delete all test entities.""" """Delete all test entities."""
db.execute_query("FIND Test*").delete(raise_exception_on_error=False) db.execute_query("FIND Test*").delete(raise_exception_on_error=False)
def setup(): def setup_module():
"""Allow all updates and delete test data""" """Allow all updates and delete test data"""
global_guard.level = UPDATE global_guard.level = UPDATE
setup_module() setup()
def teardown(): def teardown_module():
"""Reset guard level and delete test data.""" """Reset guard level and delete test data."""
global_guard.level = RETRIEVE global_guard.level = RETRIEVE
setup_module() setup()
def test_assure_list_in_place(): def test_assure_list_in_place():
"""Test an in-place update with `assure_object_is_in_list`.""" """Test an in-place update with `assure_object_is_in_list`."""
int_list_prop = db.Property(name="TestIntListProperty", int_list_prop = db.Property(name="TestIntListProperty",
datatype=db.LIST(db.INTEGER)).insert() datatype=db.LIST(db.INTEGER)).insert()
rt1 = db.RecordType(name="TestType1").add_property( rt1 = db.RecordType(name="TestType1").add_property(
......
...@@ -391,7 +391,7 @@ class AbstractFileCFood(AbstractCFood): ...@@ -391,7 +391,7 @@ class AbstractFileCFood(AbstractCFood):
def assure_object_is_in_list(obj, containing_object, property_name, def assure_object_is_in_list(obj, containing_object, property_name,
to_be_updated=None, datatype=None): to_be_updated=None, datatype=None):
"""Checks whether `obj` is one of the values in the list property """Checks whether `obj` is one of the values in the list property
`property_name` of the supplied entity containing_object`. `property_name` of the supplied entity `containing_object`.
If this is the case this function returns. Otherwise the entity is If this is the case this function returns. Otherwise the entity is
added to the property `property_name` and the entity added to the property `property_name` and the entity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment