'User cant delete users he created if can_change_permissions
is set to False.'

def test_user_cant_delete_subordinate(self):

    staff_user = self.get_staff_user_with_no_permissions()
    subordinate = self.get_staff_page_user(created_by=staff_user)
    endpoint = self.get_admin_url(PageUser, 'delete', subordinate.pk)
    data = {'post': 'yes'}
    self.add_permission(staff_user, self._get_delete_perm())
    self.add_permission(staff_user, 'delete_pageuser')
    self.add_page_permission(staff_user, self._permissions_page, can_change_permissions=False)
    with self.login_user_context(staff_user):
        response = self.client.post(endpoint, data)
        self.assertEqual(response.status_code, 403)
        self.assertTrue(self._user_exists())
