devtools/fake.py
changeset 6595 00cd0b273cf5
parent 6427 c8a5ac2d1eaa
child 6851 824d5b6eae7f
--- a/devtools/fake.py	Fri Oct 22 15:01:54 2010 +0200
+++ b/devtools/fake.py	Fri Oct 22 16:01:54 2010 +0200
@@ -127,6 +127,16 @@
     def validate_cache(self):
         pass
 
+    def build_url_params(self, **kwargs):
+        # overriden to get predictable resultts
+        args = []
+        for param, values in sorted(kwargs.iteritems()):
+            if not isinstance(values, (list, tuple)):
+                values = (values,)
+            for value in values:
+                assert value is not None
+                args.append(u'%s=%s' % (param, self.url_quote(value)))
+        return '&'.join(args)
 
 class FakeUser(object):
     login = 'toto'