def test_domain_remap_configured_with_prefixes(self):
    conf = {'reseller_prefixes': 'PREFIX'}
    self.app = domain_remap.DomainRemapMiddleware(FakeApp(), conf)
    req = Request.blank('/test', environ={'REQUEST_METHOD': 'GET'}, headers={'Host': 'c.prefix_uuid.example.com'})
    resp = self.app(req.environ, start_response)
    self.assertEquals(resp, '/v1/PREFIX_uuid/c/test')
def test_domain_remap_configured_with_prefixes(self):
    conf = {'reseller_prefixes': 'PREFIX'}
    self.app = domain_remap.DomainRemapMiddleware(FakeApp(), conf)
    req = Request.blank('/test', environ={'REQUEST_METHOD': 'GET'}, headers={'Host': 'c.prefix_uuid.example.com'})
    resp = self.app(req.environ, start_response)
    self.assertEquals(resp, '/v1/PREFIX_uuid/c/test')