示例#1
0
 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
示例#2
0
 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
示例#3
0
 def _t(self, uri, **kwargs):
     from django_zodb.utils import parse_uri
     self.assertEqual(parse_uri(uri), kwargs)
示例#4
0
 def _t(self, uri, **kwargs):
     from django_zodb.utils import parse_uri
     self.assertEquals(parse_uri(uri), kwargs)