Ensure used_in_edit is always set on new shots.
This commit is contained in:
@@ -347,7 +347,7 @@ class PatchShotTest(AbstractShotTest):
|
||||
url = '/api/nodes/%s' % shot._id
|
||||
|
||||
dbnode = self.get(url, auth_token='token').json()
|
||||
self.assertNotIn('used_in_edit', dbnode['properties'])
|
||||
self.assertTrue(dbnode['properties']['used_in_edit'])
|
||||
|
||||
patch = {'op': 'unlink'}
|
||||
self.patch(url, json=patch, auth_token='token')
|
||||
@@ -383,12 +383,12 @@ class PatchShotTest(AbstractShotTest):
|
||||
self.create_valid_auth_token(ctd.EXAMPLE_PROJECT_OWNER_ID, 'token')
|
||||
|
||||
url = '/api/nodes/%s' % shot._id
|
||||
self.patch(url, json={'op': 'unlink'}, auth_token='token')
|
||||
|
||||
dbnode = self.get(url, auth_token='token').json()
|
||||
self.assertNotIn('used_in_edit', dbnode['properties'])
|
||||
self.assertFalse(dbnode['properties']['used_in_edit'])
|
||||
|
||||
patch = {'op': 'relink'}
|
||||
self.patch(url, json=patch, auth_token='token')
|
||||
self.patch(url, json={'op': 'relink'}, auth_token='token')
|
||||
|
||||
dbnode = self.get(url, auth_token='token').json()
|
||||
self.assertTrue(dbnode['properties']['used_in_edit'])
|
||||
|
Reference in New Issue
Block a user