Beispiel #1
0
    def setup(self):
        url = os.environ[self.riak_url_env]
        urlparts = urlparse.urlparse(url)
        protocol = urlparts.scheme.lower()
        node = {'host': urlparts.hostname}
        if ':' in urlparts.hostname:
            if protocol == 'pbc':
                node['pb_port'] = urlparts.port
            if protocol in ('http', 'https'):
                node['http_port'] = urlparts.port

        db_name = 'mapproxy_test_%d' % random.randint(0, 100000)

        TileCacheTestBase.setup(self)

        self.cache = RiakCache([node], protocol, db_name, tile_grid=tile_grid(3857, name='global-webmarcator'))