def test_non_form_handler_plugin(self):
"""
Test that attempting to submit a non-cmsplugin-form-handler plugin
fails as expected
"""
sample_name = self.get_random_string(10)
sample_msg = self.get_random_string(100)
action_url = reverse(
'cmsplugin_form_handler:process_form',
args=(self.text_plugin, )
)
with self.assertRaises(ImproperlyConfigured):
self.client.post(action_url, {
'name': sample_name,
'message': sample_msg,
'cmsplugin_form_source_url': '/en/',
}, follow=True)
评论列表
文章目录