Pergunta

My Django app needs a test that follows the following scenario: creates a page, edits it by adding a new plugin, then saves it. So far, I am stuck at adding the plugin to the page. How can I do this programatically in a test?

I looked over add_plugin() from cms.api, but it needs a placeholder, which I have no idea how to link to an existing page and/or template.

Foi útil?

Solução

create a page with cms.api... and then get the right placeholder form page.placeholders.all() and call the add_plugin() with this.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top