Last change
on this file was
202,
checked in by mylan, 18 years ago
|
Change sending notification e-mail from secureSend() to send().
Add to notification templates mail fields: To, From, Subject
|
File size:
1019 bytes
|
Line | |
---|
1 | # |
---|
2 | # PingInfo TestCase |
---|
3 | # |
---|
4 | |
---|
5 | from base import * |
---|
6 | |
---|
7 | class TestPingInfo(TestCase): |
---|
8 | |
---|
9 | def afterSetUp(self): |
---|
10 | self.loginAsPortalOwner() |
---|
11 | self.portal.invokeFactory('PingTool', id='pt1',title='Ping Tool 1') |
---|
12 | self.pt1 = getattr(self.portal, 'pt1', None) |
---|
13 | self.pt1.invokeFactory('PingInfo', id='pi1',title='Ping Info 1') |
---|
14 | self.pi1 = getattr(self.pt1, 'pi1', None) |
---|
15 | |
---|
16 | def testAddedPingInfo(self): |
---|
17 | self.pi1.setUrl('http://nohost') |
---|
18 | self.failUnlessEqual(self.pi1.getUrl(), 'http://nohost') |
---|
19 | self.failUnlessEqual(self.pi1.getMethod_name(), 'weblogUpdates.ping') |
---|
20 | self.pi1.setMethod_name('testmethod') |
---|
21 | self.failUnlessEqual(self.pi1.getMethod_name(), 'testmethod') |
---|
22 | self.pi1.setRss_version(self.pi1.Vocabulary('rss_version')[0][-1]) |
---|
23 | self.failUnlessEqual(self.pi1.getRss_version(), 'RSS2') |
---|
24 | |
---|
25 | |
---|
26 | def test_suite(): |
---|
27 | from unittest import TestSuite, makeSuite |
---|
28 | suite = TestSuite() |
---|
29 | suite.addTest(makeSuite(TestPingInfo)) |
---|
30 | return suite |
---|
Note: See
TracBrowser
for help on using the repository browser.