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
This commit is contained in:
Cédric Krier committed 2020-03-05 22:59:00 +01:00
1 parent d809ff16ee
commit 38e3afba86
1 file changed
+3 -1
+3 -1
View File
@@ -56,12 +56,13 @@ Try to complete project without task::
...
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 @@ Change progress with updating status::
Re-open task::
>>> task = Work(task.id)
>>> task.progress = 0.5
>>> task.save()