'When removing a draft plugin we would expect the public copy of the plugin to also be removed'

def test_remove_plugin_before_published(self):

    page = api.create_page(title='test    page', language=settings.LANGUAGES[0][0], template='nav_playground.html')
    plugin = api.add_plugin(placeholder=page.placeholders.get(slot='body'), language='en', plugin_type='TextPlugin', body='')
    self.assertEqual(CMSPlugin.objects.all().count(), 1)
    plugin_data = {'plugin_id': plugin.pk}
    endpoint = self.get_admin_url(Page, 'delete_plugin', plugin.pk)
    endpoint += '?cms_path=/en/'
    response = self.client.post(endpoint, plugin_data)
    self.assertEqual(response.status_code, 302)
    self.assertEqual(0, CMSPlugin.objects.all().count())
