def _parse_uri(self, uri): config = parse_uri(uri) query = config.pop('query', {}) for key, values in list(query.items()): if key in config: raise ValueError("Cannot override %r argument." % key) value = values[-1] # only last argument if value == '': # ?arg1&arg2&... == ?arg1=1&arg2=1&... config[key] = '1' else: config[key] = value return config
def _parse_uri(self, uri): config = parse_uri(uri) query = config.pop('query', {}) for key, values in query.items(): if key in config: raise ValueError("Cannot override %r argument." % key) value = values[-1] # only last argument if value == '': # ?arg1&arg2&... == ?arg1=1&arg2=1&... config[key] = '1' else: config[key] = value return config
def _t(self, uri, **kwargs): from django_zodb.utils import parse_uri self.assertEqual(parse_uri(uri), kwargs)
def _t(self, uri, **kwargs): from django_zodb.utils import parse_uri self.assertEquals(parse_uri(uri), kwargs)