Ejemplo n.º 1
0
 def test_url_replace_param(self):
     self.assertEqual(url_replace_param("/foo/bar?baz=foo", "baz", "yohoo"),
                      "/foo/bar?baz=yohoo")
     self.assertEqual(url_replace_param("/foo/bar?baz=foo", "baz", None),
                      "/foo/bar")
     self.assertEqual(url_replace_param("/foo/bar#id", "baz", "foo"),
                      "/foo/bar?baz=foo#id")
 def test_url_replace_param(self):
     self.assertEquals(
         url_replace_param('/foo/bar?baz=foo', 'baz', 'yohoo'),
         '/foo/bar?baz=yohoo')
     self.assertEquals(url_replace_param('/foo/bar?baz=foo', 'baz', None),
                       '/foo/bar')
     self.assertEquals(url_replace_param('/foo/bar#id', 'baz', 'foo'),
                       '/foo/bar?baz=foo#id')