CMFActivity: Always set zope.globalrequest
ERP5 uses a mix of context.REQUEST and Products.ERP5Type.Global.get_request(), which now uses zope.globalrequest.getRequest(). CMFActivity reconstruct the original request before executing activity, so that the activity is executed with a request equivalent to the request at the time where the method was activated. For this, context.REQUEST was properly restored, but get_request()/globalrequest was only restored when the REQUEST had some Accept-Language header, so that it replays the language negociation for Localizer. With browser requests, I guess every browser pass an Accept-Language header ( according to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language all major browser support it), but within unit tests such header is not present. So this lead to activities with unit test requests being slightly different, because as they don't have Accept-Language, context.REQUEST was set, but the global request was not set, so they were running with two different requests in context.REQUEST and global request, leading to some problems for example with formulator fields.
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
passed |
#218219
external
|
ERP5.CodingStyleTest-Master |
13:14:35
|
||||||
passed |
#218235
external
|
ERP5.PerformanceTest-Master |
02:51:57
|
||||||
failed |
#218224
external
|
ERP5.UnitTest-Master |
08:26:33
|
||||||
failed |
#218193
external
|
ERP5.UnitTest-Master.Medusa |
12:49:50
|
||||||
passed |
#218282
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:24:09
|
||||||
passed |
#218299
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:18:03
|
||||||
passed |
#218038
external
retried
|
ERP5.CodingStyleTest-Master |
02:52:40
|
||||||
passed |
#218043
external
retried
|
ERP5.PerformanceTest-Master |
00:22:44
|
||||||
passed |
#218057
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:23:57
|
||||||
passed |
#218213
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:17:23
|
||||||
passed |
#218017
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:22:00
|
||||||
passed |
#218097
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:18:29
|
||||||
passed |
#218136
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:10:14
|
||||||
passed |
#218158
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:36:05
|
||||||
passed |
#218109
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:10:19
|
||||||
passed |
#218125
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:13:41
|
||||||
passed |
#218201
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:28:31
|
||||||
passed |
#218010
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:15:35
|
||||||
passed |
#218070
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:16:53
|
||||||
passed |
#218084
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:14:04
|
||||||
passed |
#218171
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:15:21
|
||||||