'Test the creation of new sites'

def test_create_new_site(self):

    response = self.api_client.post(self.api_site_url, data=self.slave2_data)
    self.assertEqual(response.status_code, 401)
    self.api_client.client.login(username=self.user, password=self.passwd)
    response = self.api_client.post(self.api_site_url, format='json', data=self.slave2_data)
    self.assertEqual(response.status_code, 201)
    self.assertTrue(Site.objects.filter(name='Slave2').exists())
