'Test that the layer_acls overridden function behaves correctly on a master site'

@override_settings(SITE_ID=1)
def test_layer_acls_master_site(self):

    acls_site_url = reverse('layer_acls_dep')
    response = self.client.get(acls_site_url)
    self.assertValidJSONResponse(response)
    self.assertEqual(len(self.deserialize(response)['rw']), 0)
    self.assertEqual(len(self.deserialize(response)['ro']), 8)
    self.client.login(username='bobby', password='bob')
    response = self.client.get(acls_site_url)
    self.assertValidJSONResponse(response)
    self.assertEqual(len(self.deserialize(response)['rw']), 0)
    self.assertEqual(len(self.deserialize(response)['ro']), 8)
    self.client.logout()
    self.client.login(username=self.user, password=self.passwd)
    response = self.client.get(acls_site_url)
    self.assertValidJSONResponse(response)
    self.assertEqual(len(self.deserialize(response)['rw']), 8)
    self.assertEqual(len(self.deserialize(response)['ro']), 0)
