def test_lock_workspace(self): """Test lock_workspace()""" r = fapi.lock_workspace(self.project, self.workspace) print(r.status_code, r.content) self.assertEqual(r.status_code, 204) # Unlock, for other tests fapi.unlock_workspace(self.project, self.workspace)
def lock(self): """Lock this Workspace. This causes the workspace to behave in a read-only way, regardless of access permissions. """ r = fapi.lock_workspace(self.namespace, self.name, self.api_url) fapi._check_response_code(r, 204) self.data['workspace']['isLocked'] = True return self