'User can\'t delete a translation with plugins if he
does not have delete permissions on the Page model,
does not have delete permissions on the plugins in the translation,
and/or does not have global delete permissions.'

def test_user_cant_delete_non_empty_translation(self):

    page = self._permissions_page
    endpoint = self.get_admin_url(Page, 'delete_translation', page.pk)
    staff_user = self.get_staff_user_with_no_permissions()
    translation = self._add_translation_to_page(page)
    self._add_plugin_to_page(page, language=translation.language)
    self.add_permission(staff_user, 'change_page')
    self.add_permission(staff_user, 'delete_page')
    self.add_page_permission(staff_user, page, can_change=True, can_delete=True)
    with self.login_user_context(staff_user):
        data = {'language': translation.language}
        response = self.client.post(endpoint, data)
        self.assertEqual(response.status_code, 403)
        self.assertTrue(self._translation_exists())
