comparison bitten/tests/notify.py @ 824:a4676056c8d3

Changed notification to always use Genshi `NewTextTemplate` which lets us keep just one template for both Trac 0.11 and 0.12+.
author osimons
date Thu, 16 Sep 2010 13:01:17 +0000
parents 73ed8c171063
children
comparison
equal deleted inserted replaced
822:172826bf87ac 824:a4676056c8d3
81 def test_notification_is_sent_to_author(self): 81 def test_notification_is_sent_to_author(self):
82 self.email.notify(self.build) 82 self.email.notify(self.build)
83 self.assertTrue('author' in self.notifications_sent_to, 83 self.assertTrue('author' in self.notifications_sent_to,
84 'Recipient list should contain the author') 84 'Recipient list should contain the author')
85 85
86 def test_notification_body_render(self):
87 self.email.notify(self.build)
88 output = self.email.template.generate(**self.email.data).render('text')
89 self.assertTrue('Successful build of My Project [123]' in output)
90 self.assertTrue('<http://example.org/trac.cgi/changeset/123>' in output)
91
86 # TODO functional tests of generated mails 92 # TODO functional tests of generated mails
87 93
88 94
89 def suite(): 95 def suite():
90 suite = unittest.TestSuite() 96 suite = unittest.TestSuite()
Copyright (C) 2012-2017 Edgewall Software