def test_domain_remap_account(self):
    req = Request.blank('/', environ={'REQUEST_METHOD': 'GET', 'SERVER_NAME': 'AUTH_a.example.com'}, headers={'Host': None})
    resp = self.app(req.environ, start_response)
    self.assertEquals(resp, '/v1/AUTH_a')
    req = Request.blank('/', environ={'REQUEST_METHOD': 'GET'}, headers={'Host': 'AUTH_a.example.com'})
    resp = self.app(req.environ, start_response)
    self.assertEquals(resp, '/v1/AUTH_a')
    req = Request.blank('/', environ={'REQUEST_METHOD': 'GET'}, headers={'Host': 'AUTH-uuid.example.com'})
    resp = self.app(req.environ, start_response)
    self.assertEquals(resp, '/v1/AUTH_uuid')
def test_domain_remap_account(self):
    req = Request.blank('/', environ={'REQUEST_METHOD': 'GET', 'SERVER_NAME': 'AUTH_a.example.com'}, headers={'Host': None})
    resp = self.app(req.environ, start_response)
    self.assertEquals(resp, '/v1/AUTH_a')
    req = Request.blank('/', environ={'REQUEST_METHOD': 'GET'}, headers={'Host': 'AUTH_a.example.com'})
    resp = self.app(req.environ, start_response)
    self.assertEquals(resp, '/v1/AUTH_a')
    req = Request.blank('/', environ={'REQUEST_METHOD': 'GET'}, headers={'Host': 'AUTH-uuid.example.com'})
    resp = self.app(req.environ, start_response)
    self.assertEquals(resp, '/v1/AUTH_uuid')