'User can delete an empty translation if he has
delete & change permissions on the Page model and he has
global delete & change permissions.'

def test_user_can_delete_empty_translation(self):

    page = self.get_permissions_test_page()
    endpoint = self.get_admin_url(Page, 'delete_translation', page.pk)
    redirect_to = self.get_admin_url(Page, 'changelist')
    staff_user = self.get_staff_user_with_no_permissions()
    translation = self._add_translation_to_page(page)
    self.add_permission(staff_user, 'change_page')
    self.add_permission(staff_user, 'delete_page')
    self.add_global_permission(staff_user, can_change=True, can_delete=True)
    with self.login_user_context(staff_user):
        data = {'language': translation.language}
        response = self.client.post(endpoint, data)
        self.assertRedirects(response, redirect_to)
        self.assertFalse(self._translation_exists())
