Start adding unittests for prototypes
This commit is contained in:
parent
7f250cdec4
commit
e533ceacfe
3 changed files with 48 additions and 4 deletions
|
|
@ -426,10 +426,12 @@ def spawn(*prototypes, **kwargs):
|
|||
|
||||
"""
|
||||
# get available protparents
|
||||
protparents = {prot['prototype_key']: prot for prot in protlib.search_prototype()}
|
||||
protparents = {prot['prototype_key'].lower(): prot for prot in protlib.search_prototype()}
|
||||
|
||||
# overload module's protparents with specifically given protparents
|
||||
protparents.update(kwargs.get("prototype_parents", {}))
|
||||
protparents.update(
|
||||
{key.lower(): value for key, value in kwargs.get("prototype_parents", {}).items()})
|
||||
|
||||
for key, prototype in protparents.items():
|
||||
protlib.validate_prototype(prototype, key.lower(), protparents)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue