

def test_domainadmin_deletes_reseller(self):
    'Check if a domain admin can delete a reseller.\n\n        Expected result: no.\n        '
    values = dict(username='reseller@test.com', first_name='Reseller', last_name='', password1='Toto1234', password2='Toto1234', role='Resellers', is_active=True, email='reseller@test.com', stepid='step2')
    self.ajax_post(reverse('admin:account_add'), values)
    account = User.objects.get(username='reseller@test.com')
    self.client.logout()
    self.client.login(username='admin@test.com', password='toto')
    resp = self.ajax_post(reverse('admin:account_delete', args=[account.id]), {
        
    }, status=403)
    self.assertEqual(resp, 'Permission denied')

dataset/ETHPy150Open tonioo/modoboa/modoboa/limits/tests/test_user_limits.py PermissionsTestCase.test_domainadmin_deletes_reseller/original