'Test adding a *NON PAGE* plugin'

def test_add_ph(self):

    (page, placeholder, superuser, staff) = self.get_data()
    post_data = {}
    endpoint = self.get_add_plugin_uri(placeholder, 'TextPlugin', settings.LANGUAGES[0][0])
    self.assertEqual(CMSPlugin.objects.count(), 0)
    self.client.logout()
    response = self.client.post(endpoint, post_data)
    self.assertEqual(response.status_code, 302)
    querystring = QueryDict('', mutable=True)
    querystring['next'] = endpoint
    expected_url = '/{lang}/admin/login/?{next}'.format(lang=settings.LANGUAGES[0][0], next=querystring.urlencode(safe='/'))
    self.assertRedirects(response, expected_url)
    self.assertEqual(CMSPlugin.objects.count(), 0)
    self.client.login(username=getattr(staff, get_user_model().USERNAME_FIELD), password=getattr(staff, get_user_model().USERNAME_FIELD))
    response = self.client.post(endpoint, post_data)
    self.assertEqual(response.status_code, 403)
    self.assertEqual(CMSPlugin.objects.count(), 0)
