MCPcopy Index your code
hub / github.com/webpy/webpy / test_changequery

Method test_changequery

tests/test_application.py:379–394  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

377 self.assertEqual(x.a, 2)
378
379 def test_changequery(self):
380 urls = ("/", "index")
381
382 class index:
383 def GET(self):
384 return web.changequery(x=1)
385
386 app = web.application(urls, locals())
387
388 def f(path):
389 return app.request(path).data
390
391 self.assertEqual(f("/?x=2"), b"/?x=1")
392
393 p = f("/?y=1&y=2&x=2")
394 self.assertTrue(p in {b"/?y=1&y=2&x=1", b"/?x=1&y=1&y=2"})
395
396 def test_setcookie(self):
397 urls = ("/", "index")

Callers

nothing calls this directly

Calls 1

fFunction · 0.85

Tested by

no test coverage detected