当前位置: 首页>>代码示例>>Python>>正文


Python Milestone.description方法代码示例

本文整理汇总了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)
开发者ID:getpenelope,项目名称:fulltextsearchplugin,代码行数:28,代码来源:fulltextsearch.py

示例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
开发者ID:domaemon,项目名称:bloodhound-qa,代码行数:10,代码来源:base.py

示例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()
开发者ID:nyuhuhuu,项目名称:trachacks,代码行数:12,代码来源:qatracker.py

示例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()))
开发者ID:CGI-define-and-primeportal,项目名称:trac-plugin-solr,代码行数:18,代码来源:admin.py

示例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
开发者ID:domaemon,项目名称:bloodhound-qa,代码行数:8,代码来源:base.py


注:本文中的trac.ticket.Milestone.description方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。