ES-DOC / esdoc-questionnaire

ES-DOC Questionnaire (webform generator for creating CIM Documents). POC: @allynt
Other
2 stars 1 forks source link

Rewrite convenience "create_x" fns in the test framework. #498

Closed allynt closed 7 years ago

allynt commented 7 years ago

WHO: @allynt

Rewrite convenience "create_x" fns in the test framework.

allynt commented 7 years ago

It turned out that in create_customization I couldn't just rely on saving a given customization model to ensure that all of its fields (and, more importantly all of its related customization models) were set correctly. Instead I needed to manually update some of the fields (which would have been done automatically on the client-side had I been working outside of the testing framework), then serialize it, then save it using my custom QModelCustomzationSerializer class.

That all worked.

allynt commented 7 years ago

I need to do the same thing for create_realization.

allynt commented 7 years ago

D'oh! I completely forgot that while the full hierarchy of customizations is created right at the start, only the top-level realization is ever created. Therefore, these complications don't exist for create_realization. I am therefore closing this ticket.

allynt commented 7 years ago

Actually, I do need it for create_realization, in order to deal w/ the child-parent relationship among properties and models.

allynt commented 7 years ago

Done.