當前位置: 首頁>>代碼示例>>Python>>正文


Python Milestone.completed方法代碼示例

本文整理匯總了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)
開發者ID:djangsters,項目名稱:agilo,代碼行數:20,代碼來源:agilomilestone_test.py


注:本文中的trac.ticket.Milestone.completed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。