本文整理汇总了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