Added etag checking when saving tasks & shots. Still a bit rough.
Needs nicer user interface stuff for explaining what's going on.
This commit is contained in:
@@ -4,6 +4,7 @@ import responses
|
||||
from bson import ObjectId
|
||||
|
||||
import pillarsdk
|
||||
import pillarsdk.exceptions as sdk_exceptions
|
||||
import pillar.api.utils
|
||||
import pillar.tests
|
||||
import pillar.auth
|
||||
@@ -59,11 +60,20 @@ class TaskWorkflowTest(AbstractAttractTest):
|
||||
pillar.auth.login_user(ctd.EXAMPLE_PROJECT_OWNER_ID)
|
||||
|
||||
self.mock_blenderid_validate_happy()
|
||||
self.assertRaises(sdk_exceptions.PreconditionFailed,
|
||||
self.mngr.edit_task,
|
||||
task._id,
|
||||
task_type=u'je møder',
|
||||
name=u'nööw name',
|
||||
description=u'€ ≠ ¥',
|
||||
status='todo',
|
||||
_etag='jemoeder')
|
||||
self.mngr.edit_task(task._id,
|
||||
task_type=u'je møder',
|
||||
name=u'nööw name',
|
||||
description=u'€ ≠ ¥',
|
||||
status='todo')
|
||||
status='todo',
|
||||
_etag=task._etag)
|
||||
|
||||
# Test directly with MongoDB
|
||||
with self.app.test_request_context():
|
||||
|
Reference in New Issue
Block a user