cubicweb #3375021 FakeRequest hardcodes accepted languages [done]

The implementation of FakeRequest.header_accept_language() returns an hardcoded ('en',) tuple and doesn't use the Accept-language header if present:

req = self.request()
req.set_request_header('accept-language', 'fr-FR', raw=True)
print list(req.header_accept_language()) # will print ('en',) instead of ('fr',)

I think that FakeRequest should rather initalize headers_in with Accept-Language: en and use the standard implementation of header_accept_language().

prioritynormal
typebug
done in<not specified>
load0.100
load left0.000
closed by#060bd51c6779 [test] remove custom implementation of FakeRequest.header_accept_language() (closes #3375021)
patch[test] remove custom implementation of FakeRequest.header_accept_language() (closes #3375021) [applied]