'Test layer feature catalogue functionality'

def test_layer_attributes_feature_catalogue(self):

    url = reverse('layer_feature_catalogue', args=('bad_layer',))
    response = self.client.get(url)
    self.assertEquals(response.status_code, 404)
    layer = Layer.objects.get(pk=3)
    url = reverse('layer_feature_catalogue', args=(layer.alternate,))
    response = self.client.get(url)
    self.assertEquals(response.status_code, 400)
    self.assertEquals(response['content-type'], 'application/json')
    layer = Layer.objects.get(pk=2)
    url = reverse('layer_feature_catalogue', args=(layer.alternate,))
    response = self.client.get(url)
    self.assertEquals(response.status_code, 200)
    self.assertEquals(response['content-type'], 'application/xml')
