

def _servers_localhost_zones_EXISTS(self, method, url, body, headers):
    if (method != 'POST'):
        raise NotImplementedError(('Unexpected method: %s' % method))
    payload = json.loads(body)
    domain = payload['name']
    body = json.dumps({
        'error': ("Domain '%s' already exists" % domain),
    })
    return (httplib.UNPROCESSABLE_ENTITY, body, self.base_headers, 'Unprocessable Entity')

dataset/ETHPy150Open apache/libcloud/libcloud/test/dns/test_powerdns.py PowerDNSMockHttp._servers_localhost_zones_EXISTS/original