本文整理匯總了Python中tracim.lib.workspace.WorkspaceApi.calendar_enabled方法的典型用法代碼示例。如果您正苦於以下問題:Python WorkspaceApi.calendar_enabled方法的具體用法?Python WorkspaceApi.calendar_enabled怎麽用?Python WorkspaceApi.calendar_enabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tracim.lib.workspace.WorkspaceApi
的用法示例。
在下文中一共展示了WorkspaceApi.calendar_enabled方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_func__rights_read_workspace_calendar__fail__as_unauthorized
# 需要導入模塊: from tracim.lib.workspace import WorkspaceApi [as 別名]
# 或者: from tracim.lib.workspace.WorkspaceApi import calendar_enabled [as 別名]
def test_func__rights_read_workspace_calendar__fail__as_unauthorized(self):
lawrence = DBSession.query(User).filter(
User.email == '[email protected]'
).one()
workspace = WorkspaceApi(lawrence).create_workspace(
'workspace_1',
save_now=False
)
workspace.calendar_enabled = True
DBSession.flush()
workspace_calendar_url = CalendarManager.get_workspace_calendar_url(
workspace.workspace_id
)
transaction.commit()
radicale_base_url = CalendarManager.get_base_url()
client = caldav.DAVClient(
radicale_base_url,
username='[email protected]',
password='foobarbaz'
)
caldav.Calendar(
parent=client,
client=client,
url=workspace_calendar_url
).events()