Prevent to store base Nodes in the DB but only their subclasses#2301
Conversation
There was a problem hiding this comment.
Suggestion:
Note that here we use `@workfunctions` and `@calculations`, the concrete versions of the `@process_function` decorator, even though we are testing only the shared functionality that is captured in the `@process_function` decorator, relating to the transformation of the wrapped function into a `FunctionProcess`. The reason we do not use the `@process_function` decorator itself, is because it does not have a node class by default. We could create one on the fly, but then anytime inputs or outputs would be attached to it in the tests, the `validate_link` function would complain as the dummy node class is not recognized as a valid process node.
There was a problem hiding this comment.
Maybe put this in a function revert_database_schema such that you can deduplicate the code in the tearDown method
The main work is actually fixing all tests to avoid to use Node directly. This also allowed to spot a few bugs and inconsistencies in the tests.
9d21b40 to
d6e5e4c
Compare
|
I took care of all 4 comments and rebased |
This PR fixes #2300, that explains the reasoning behind it