Added editing of shots
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
import responses
|
||||
from bson import ObjectId
|
||||
|
||||
import pillarsdk
|
||||
import pillar.tests
|
||||
@@ -82,3 +83,28 @@ class ShotManagerTest(AbstractAttractTest):
|
||||
u'effects': {task4['_id'], task5['_id']},
|
||||
None: {task6['_id']},
|
||||
}, shot_id_to_task[shot2_id])
|
||||
|
||||
@responses.activate
|
||||
def test_edit_shot(self):
|
||||
shot = self.create_shot()
|
||||
|
||||
with self.app.test_request_context():
|
||||
# Log in as project admin user
|
||||
pillar.auth.login_user(ctd.EXAMPLE_PROJECT_OWNER_ID)
|
||||
|
||||
self.mock_blenderid_validate_happy()
|
||||
|
||||
self.smngr.edit_shot(shot_id=shot['_id'],
|
||||
name=u'ผัดไทย',
|
||||
description=u'Shoot the Pad Thai',
|
||||
status='todo')
|
||||
|
||||
# Test directly with MongoDB
|
||||
with self.app.test_request_context():
|
||||
nodes_coll = self.app.data.driver.db['nodes']
|
||||
found = nodes_coll.find_one(ObjectId(shot['_id']))
|
||||
self.assertEqual(u'ผัดไทย', found['name'])
|
||||
self.assertEqual(u'todo', found['properties']['status'])
|
||||
self.assertEqual(u'Shoot the Pad Thai', found['description'])
|
||||
self.assertNotIn(u'notes', found['properties'])
|
||||
|
||||
|
@@ -62,7 +62,6 @@ class TaskWorkflowTest(AbstractAttractTest):
|
||||
name=u'nööw name',
|
||||
description=u'€ ≠ ¥',
|
||||
status='todo')
|
||||
self.assertIsNotNone(task)
|
||||
|
||||
# Test directly with MongoDB
|
||||
with self.app.test_request_context():
|
||||
|
Reference in New Issue
Block a user