Last change
on this file since 3665 was
626,
checked in by crchemist, 18 years ago
|
Modified tests.
|
File size:
955 bytes
|
Rev | Line | |
---|
[626] | 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.pt1 = getToolByName(self.portal, 'portal_pingtool') |
---|
| 12 | self.pt1.invokeFactory('PingInfo', id='pi1',title='Ping Info 1') |
---|
| 13 | |
---|
| 14 | def testAddedPingInfo(self): |
---|
| 15 | self.pi1 = getattr(self.pt1, 'pi1', None) |
---|
| 16 | self.pi1.setUrl('http://nohost') |
---|
| 17 | self.failUnlessEqual(self.pi1.getUrl(), 'http://nohost') |
---|
| 18 | self.failUnlessEqual(self.pi1.getMethod_name(), 'weblogUpdates.ping') |
---|
| 19 | self.pi1.setMethod_name('testmethod') |
---|
| 20 | self.failUnlessEqual(self.pi1.getMethod_name(), 'testmethod') |
---|
| 21 | self.pi1.setRss_version(self.pi1.Vocabulary('rss_version')[0][-1]) |
---|
| 22 | self.failUnlessEqual(self.pi1.getRss_version(), 'RSS2') |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | def test_suite(): |
---|
| 26 | from unittest import TestSuite, makeSuite |
---|
| 27 | suite = TestSuite() |
---|
| 28 | suite.addTest(makeSuite(TestPingInfo)) |
---|
| 29 | return suite |
---|
Note: See
TracBrowser
for help on using the repository browser.