Added shot overview with tasks.
javascript links to open or create tasks aren't implemented yet.
This commit is contained in:
@@ -20,20 +20,20 @@ class TaskWorkflowTest(AbstractAttractTest):
|
||||
|
||||
self.sdk_project = pillarsdk.Project(pillar.tests.mongo_to_sdk(self.project))
|
||||
|
||||
def create_task(self):
|
||||
def create_task(self, task_type=None):
|
||||
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()
|
||||
task = self.mngr.create_task(self.sdk_project)
|
||||
task = self.mngr.create_task(self.sdk_project, task_type=task_type)
|
||||
|
||||
self.assertIsInstance(task, pillarsdk.Node)
|
||||
return task
|
||||
|
||||
@responses.activate
|
||||
def test_create_task(self):
|
||||
task = self.create_task()
|
||||
task = self.create_task(task_type=u'Just düüüh it')
|
||||
self.assertIsNotNone(task)
|
||||
|
||||
# Test directly with MongoDB
|
||||
@@ -41,6 +41,12 @@ class TaskWorkflowTest(AbstractAttractTest):
|
||||
nodes_coll = self.app.data.driver.db['nodes']
|
||||
found = nodes_coll.find_one(ObjectId(task['_id']))
|
||||
self.assertIsNotNone(found)
|
||||
self.assertEqual(u'Just düüüh it', found['properties']['task_type'])
|
||||
|
||||
# Test it through the API
|
||||
resp = self.get('/api/nodes/%s' % task['_id'])
|
||||
found = resp.json()
|
||||
self.assertEqual(u'Just düüüh it', found['properties']['task_type'])
|
||||
|
||||
@responses.activate
|
||||
def test_edit_task(self):
|
||||
|
Reference in New Issue
Block a user