Allow Blender to mark shots as used/not used in edit.
NOTE: requires schema change, so be careful.
This commit is contained in:
@@ -339,6 +339,38 @@ class PatchShotTest(AbstractShotTest):
|
||||
}
|
||||
self.patch(url, json=patch, auth_token='other', expected_status=403)
|
||||
|
||||
@responses.activate
|
||||
def test_patch_unlink(self):
|
||||
shot = self.create_shot()
|
||||
self.create_valid_auth_token(ctd.EXAMPLE_PROJECT_OWNER_ID, 'token')
|
||||
|
||||
url = '/api/nodes/%s' % shot._id
|
||||
|
||||
dbnode = self.get(url, auth_token='token').json()
|
||||
self.assertNotIn('used_in_edit', dbnode['properties'])
|
||||
|
||||
patch = {'op': 'unlink'}
|
||||
self.patch(url, json=patch, auth_token='token')
|
||||
|
||||
dbnode = self.get(url, auth_token='token').json()
|
||||
self.assertFalse(dbnode['properties']['used_in_edit'])
|
||||
|
||||
@responses.activate
|
||||
def test_patch_relink(self):
|
||||
shot = self.create_shot()
|
||||
self.create_valid_auth_token(ctd.EXAMPLE_PROJECT_OWNER_ID, 'token')
|
||||
|
||||
url = '/api/nodes/%s' % shot._id
|
||||
|
||||
dbnode = self.get(url, auth_token='token').json()
|
||||
self.assertNotIn('used_in_edit', dbnode['properties'])
|
||||
|
||||
patch = {'op': 'relink'}
|
||||
self.patch(url, json=patch, auth_token='token')
|
||||
|
||||
dbnode = self.get(url, auth_token='token').json()
|
||||
self.assertTrue(dbnode['properties']['used_in_edit'])
|
||||
|
||||
|
||||
class RequiredAfterCreationTest(AbstractShotTest):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user