'Test the deletion of sites also removes the SiteResources'

def test_delete_site(self):

    response = self.client.delete(self.api_slave_detail_url, data={'name': 'Slave'})
    self.assertEqual(response.status_code, 401)
    self.client.login(username=self.user, password=self.passwd)
    self.assertHttpAccepted(self.client.delete(self.api_slave_detail_url))
    self.assertFalse(Site.objects.filter(name='Slave').exists())
    self.assertFalse(SiteResources.objects.filter(site=self.slave_site).exists())
