summaryrefslogtreecommitdiff
path: root/addons/test_website/tests/test_controller_args.py
AgeCommit message (Collapse)Author
2019-09-17[FIX] *: remove old deprecated modules/functionsJulien Castiaux
PEP-594 is deprecating a bunch of modules. As part of the cleanup, we are also dealing with long deprecated modules, functions and aliases. * `assert_` -> `assertTrue` * `assertEquals` -> `assertEqual` * `assertNotEquals` -> `assertNotEqual` * `assertAlmostEquals` -> `assertAlmostEqual` * `assertRaisesRegexp` -> `assertRaisesRegex` * `assertRegexpMatches` -> `assertRegex` * `base64.encodestring` -> `base64.encodebytes` * `base64.decodestring` -> `base64.decodebytes` * `inspect.getargspec` -> `inspect.signature` * `inspect.formatargspec` -> `inspect.signature` * `logging.warn` -> `logging.warning` closes odoo/odoo#36863 Task: 2003936 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-06-08[IMP] odoo: ignore unsupported args from controllerJeremy Kersten
Before this commit, call a controller defined as: ``` @http.route('/route', type='http', auth='public') def controller_func(self, foo): do_it() ``` and called with url like /route?foo=1&bar=2 will crash with an exception: `TypeError: controller_func() got an unexpected keyword argument 'bar'` Now, we remove the extra parameters if the controller doesn't support it. This case is not uncommon, you can easily arrive in this case with utm or debug as extra parameter. closes odoo/odoo#33962 Signed-off-by: Christophe Simonis <chs@odoo.com>