當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。