本文整理匯總了Python中trac.ticket.Milestone.completed方法的典型用法代碼示例。如果您正苦於以下問題:Python Milestone.completed方法的具體用法?Python Milestone.completed怎麽用?Python Milestone.completed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類trac.ticket.Milestone
的用法示例。
在下文中一共展示了Milestone.completed方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_can_save_due_date
# 需要導入模塊: from trac.ticket import Milestone [as 別名]
# 或者: from trac.ticket.Milestone import completed [as 別名]
def test_can_save_due_date(self):
# Added when Trac 0.12 was released as the format of the timestamp has changed in 0.12
milestone = Milestone(self.env)
milestone.name = 'fnord'
milestone.insert()
# in trac 0.11.1, milestone._old_name is not set to "fnord" at
# insert() time, only on init() or update()
# so we need to reload the object to be able to run update() on it
milestone = Milestone(self.env, name='fnord')
expected_time = now().replace(microsecond=0)
milestone.due = expected_time
milestone.completed = expected_time
milestone.update()
loaded_milestone = Milestone(self.env, name='fnord')
self.assert_equals(expected_time, loaded_milestone.due)
self.assert_equals(expected_time, loaded_milestone.completed)