'Test case for PlaceholderField'

def test_remove_plugin_not_associated_to_page(self):

    page = api.create_page(title='test    page', template='nav_playground.html', language='en')
    plugin = api.add_plugin(placeholder=page.placeholders.get(slot='body'), plugin_type='TextPlugin', language=settings.LANGUAGES[0][0], body='')
    self.assertEqual(CMSPlugin.objects.all().count(), 1)
    ph = Placeholder(slot='subplugin')
    ph.save()
    url = ((URL_CMS_PLUGIN_ADD + '?') + urlencode({'plugin_type': 'TextPlugin', 'plugin_language': settings.LANGUAGES[0][0], 'placeholder': ph.pk, 'plugin_parent': plugin.pk}))
    response = self.client.post(url, {'body': ''})
    self.assertEqual(response.status_code, 400)
