Tryton - Issues

 

Issue6269

Title Scenario depending on current date
Priority feature Status chatting
Superseder Nosy List ced, nicoe, pokoli
Type behavior Components trytond
Assigned To Keywords
Reviews

Created on 2017-02-14.10:09:20 by ced, last changed by ced.

Messages
msg31925 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-02-14.19:06:10
I think that monkey-patching in the test Date.today will ensure that the code is actually using it as it should instead of datetime.
msg31921 (view) Author: [hidden] (nicoe) (Tryton committer) (Tryton translator) Date: 2017-02-14.15:39:47
Isn't it possible to run the scenario using a tool like datefudge or faketime (http://www.code-wizards.com/projects/libfaketime/) ?
msg31906 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-02-14.10:09:20
The run [1] (which will disappear on relaunch) failed because the scenario run during the midnight.
I think we should have the run tests script freeze the today of ir.date and in the scenario we should always use ir.date and not datetime module.

[1] https://drone.tryton.org/trypod.tryton.org/tryton/modules.stock_supply/default/b011c4a0c872eee3508565221a48f6c49bb4e3da
History
Date User Action Args
2017-02-14 19:06:10cedsetmessages: + msg31925
2017-02-14 15:39:47nicoesetstatus: unread -> chatting
nosy: + nicoe
messages: + msg31921
2017-02-14 10:12:24pokolisetnosy: + pokoli
2017-02-14 10:09:20cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)