changeset 821d97f17dbd in modules/project:default
details: https://hg.tryton.org/modules/project?cmd=changeset;node=821d97f17dbd
description:
        Do not re-use children task instance in test scenario

        The task instance is not updated when the parent project is saved. So 
it keep
        the former timestamp in memory which raise concurrency exceptions.

        issue9101
diffstat:

 tests/scenario_project_status.rst |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 5bdf8ac5c9d5 -r 821d97f17dbd tests/scenario_project_status.rst
--- a/tests/scenario_project_status.rst Sun Mar 01 16:12:39 2020 +0100
+++ b/tests/scenario_project_status.rst Thu Mar 05 22:59:00 2020 +0100
@@ -56,12 +56,13 @@
         ...
     WorkProgressValidationError: ...
 
+    >>> task, = project.children
     >>> task.progress = 1
-    >>> task.save()
     >>> project.save()
 
 Try to re-open task without project::
 
+    >>> task = Work(task.id)
     >>> task.progress = 0.5
     >>> task.save()  # doctest: +IGNORE_EXCEPTION_DETAIL
     Traceback (most recent call last):
@@ -81,5 +82,6 @@
 
 Re-open task::
 
+    >>> task = Work(task.id)
     >>> task.progress = 0.5
     >>> task.save()

Reply via email to