本文整理匯總了Python中trac.ticket.Milestone.description方法的典型用法代碼示例。如果您正苦於以下問題:Python Milestone.description方法的具體用法?Python Milestone.description怎麽用?Python Milestone.description使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類trac.ticket.Milestone
的用法示例。
在下文中一共展示了Milestone.description方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_milestone
# 需要導入模塊: from trac.ticket import Milestone [as 別名]
# 或者: from trac.ticket.Milestone import description [as 別名]
def test_milestone(self):
milestone = Milestone(self.env)
milestone.name = 'New target date'
milestone.description = 'Lorem ipsum dolor sit amet'
milestone.insert()
so = self._get_so()
self.assertEquals('%s:milestone:New target date' % self.basename,
so.doc_id)
self.assertEquals('milestone', so.realm),
self.assertEquals('New target date', so.id)
self.assertTrue('New target date' in so.title)
self.assertTrue('Lorem ipsum' in so.title)
self.assertTrue('Lorem ipsum' in so.oneline)
self.assertTrue('Lorem ipsum' in so.body)
milestone.description = 'No latin filler here'
milestone.due = datetime(2001, 01, 01, tzinfo=utc)
milestone.update()
so = self._get_so()
self.assertEquals('%s:milestone:New target date' % self.basename,
so.doc_id)
self.assertEquals('milestone', so.realm),
self.assertEquals('New target date', so.id)
self.assertEquals(milestone.due, so.changed)
self.assertFalse('Lorem ipsum' in so.body)
self.assertTrue('No latin filler here' in so.body)
示例2: change_milestone
# 需要導入模塊: from trac.ticket import Milestone [as 別名]
# 或者: from trac.ticket.Milestone import description [as 別名]
def change_milestone(self, name_to_change, name=None, description=None):
milestone = Milestone(self.env, name_to_change)
if name is not None:
milestone.name = name
if description is not None:
milestone.description = description
milestone.update()
return milestone
示例3: _create_milestone
# 需要導入模塊: from trac.ticket import Milestone [as 別名]
# 或者: from trac.ticket.Milestone import description [as 別名]
def _create_milestone(self, name, duedate, description):
m = Milestone(self.env)
m.name = name
m.description = description
if duedate:
if isinstance(duedate, type("")):
m.due = parse_date(duedate)
else:
m.due = duedate
m.insert()
示例4: test_remove_milestone
# 需要導入模塊: from trac.ticket import Milestone [as 別名]
# 或者: from trac.ticket.Milestone import description [as 別名]
def test_remove_milestone(self):
test_name = sys._getframe().f_code.co_name
expected = self.expected_results[test_name]
ticket = Ticket(self.env)
ticket.populate({'reporter': 'santa', 'summary': 'Summary line',
'description': 'Lorem ipsum dolor sit amet',
})
ticket.insert()
milestone = Milestone(self.env)
milestone.name = 'New target date'
milestone.description = 'Lorem ipsum dolor sit amet'
milestone.insert()
self.assertEqual(2, len(self._get_docs()))
rv, output = self._execute('fulltext remove milestone')
self.assertEqual(expected, output)
self.assertEqual(1, len(self._get_docs()))
示例5: create_milestone
# 需要導入模塊: from trac.ticket import Milestone [as 別名]
# 或者: from trac.ticket.Milestone import description [as 別名]
def create_milestone(self, name, description = None):
milestone = Milestone(self.env)
milestone.name = name
if description is not None:
milestone.description = description
return milestone