@@ -0,0 +1,2254 @@
+# -*- coding: utf-8 -*-%0A%0Afrom django.conf import settings%0A%0Afrom cms.models import Page%0Afrom cms.models.pluginmodel import CMSPlugin%0Afrom cms.test_utils.util.context_managers import SettingsOverride%0Afrom cms.test_utils.testcases import (%0A    URL_CMS_PAGE_ADD,%0A    URL_CMS_PLUGIN_ADD,%0A    URL_CMS_PLUGIN_EDIT,%0A)%0A%0Afrom cms.test_utils.project.mti_pluginapp.models import TestPluginBetaModel%0A%0Afrom .plugins import PluginsTestBaseCase%0A%0A%0A# class CustomPluginsTestCase(PluginsTestBaseCase):%0A%0A#     def test_add_edit_plugin(self):%0A#         %22%22%22%0A#         Test that we can instantiate and use a MTI plugin%0A#         %22%22%22%0A%0A#         INSTALLED_APPS = settings.INSTALLED_APPS%0A#         INSTALLED_APPS = INSTALLED_APPS + %5B'cms.test_utils.project.mti_pluginapp'%5D%0A%0A#         with SettingsOverride(INSTALLED_APPS):%0A%0A#             # Create a page%0A#             page_data = self.get_new_page_data()%0A#             self.client.post(URL_CMS_PAGE_ADD, page_data)%0A#             page = Page.objects.all()%5B0%5D%0A%0A#             # Add the MTI plugin%0A#             plugin_data = %7B%0A#                 'plugin_type': %22TestPluginBeta%22,%0A#                 'plugin_language': settings.LANGUAGES%5B0%5D%5B0%5D,%0A#                 'placeholder_id': page.placeholders.get(slot=%22body%22).pk,%0A#                 'plugin_parent': '',%0A#             %7D%0A#             response = self.client.post(URL_CMS_PLUGIN_ADD, plugin_data)%0A#             self.assertEqual(response.status_code, 200)%0A#             plugin_id = self.get_response_pk(response)%0A#             self.assertEqual(plugin_id, CMSPlugin.objects.all()%5B0%5D.pk)%0A%0A#             # Test we can open the change form for the MTI plugin%0A#             edit_url = %22%25s%25s/%22 %25 (URL_CMS_PLUGIN_EDIT, plugin_id)%0A#             response = self.client.get(edit_url)%0A#             self.assertEqual(response.status_code, 200)%0A%0A#             # Edit the MTI plugin%0A#             data = %7B%0A#                 %22alpha%22: %22ALPHA%22,%0A#                 %22beta%22: %22BETA%22%0A#             %7D%0A#             response = self.client.post(edit_url, data)%0A#             self.assertEqual(response.status_code, 200)%0A%0A#             # Test that the change was properly stored in the DB%0A#             plugin_model = TestPluginBetaModel.objects.all()%5B0%5D%0A#             self.assertEqual(%22BETA%22, plugin_model.body)%0A

Create test case for MTI Plugins