Files
odoo_source/addons/website/tests
Nicolas Lempereur 8557bcfa30 [FIX] website: language prefixed URL on website bis
Reintroduces 5324284f5 that was reverted because in the case of an URL
like /payment_stripe/static/src/js/stripe.js directly inside a QWeb
template, we would possibly get:

  /fr_FR/payment_stripe/static/src/js/stripe.js

Which is not accepted by werkzeug SharedDataMiddleware we use to serve
static data in /{module_name}/static/ directories.

Added test without changeset failed with:

- test_process_att_no_request_lang: <AssertionError>
  line: self._test_att('/en_US/', {'href': '/'})
  wrong result: {'href': '/en_US/'}
- test_process_att_with_request_lang: <AssertionError>
  line: self._test_att('/', {'href': '/fr_FR/'})
  wrong result: {'href': '/'}
- test_process_att_matching_cdn_and_lang: <AssertionError>
  line: self._test_att('/en_US/a', {'href': 'http://test.cdn/a'})
  wrong result: {'href': 'http://test.cdn/en_US/a'}
- test_process_att_no_route: <AssertionError>
  line: self._test_att('/my-page', {'href': '/fr_FR/my-page'})
  wrong result: {'href': '/my-page'}
- test_process_att_url_crap: <IndexError: list index out of range>
  line: request.httprequest.app._log_call[-1],

opw-1922051
closes #32095

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-02 14:45:24 +00:00
..