本文整理汇总了Python中admit.AT.AT.setProject方法的典型用法代码示例。如果您正苦于以下问题:Python AT.setProject方法的具体用法?Python AT.setProject怎么用?Python AT.setProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admit.AT.AT
的用法示例。
在下文中一共展示了AT.setProject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_AT_projectID
# 需要导入模块: from admit.AT import AT [as 别名]
# 或者: from admit.AT.AT import setProject [as 别名]
def test_AT_projectID(self):
""" test AT setProject(), getProject(), id() """
at = AT({'alias': 'q'})
self.project.addtask(at)
# get the taskid before adding project id
tid = at._taskid
# now set the project id
at.setProject(2)
self.assertEqual(at.getProject(), 2)
# now strip out the project id from _taskid
self.assertEqual(at.id(True), tid)
示例2: test_projectID
# 需要导入模块: from admit.AT import AT [as 别名]
# 或者: from admit.AT.AT import setProject [as 别名]
def test_projectID(self):
at = AT({'alias': 'q'})
self.project.addtask(at)
# get the taskid before adding project id
tid = at._taskid
if(self.verbose):
print "\nAT Class taskid (before):", at._taskid
# now set the project id
pid = 2
at.setProject(pid)
pid = at.getProject()
if(self.verbose):
print "\nAT Class project", pid
self.assertEqual(pid, 2)
# now strip out the project id from _taskid
taskid = at.id(True)
if(self.verbose):
print "\nAT Class taskid (after):", taskid
self.assertEqual(taskid, tid)