source: products/quintagroup.pingtool/trunk/quintagroup/pingtool/tests/test_pinginfo.py @ 3665

Last change on this file since 3665 was 626, checked in by crchemist, 18 years ago

Modified tests.

File size: 955 bytes
Line 
1#
2# PingInfo TestCase
3#
4
5from base import *
6
7class 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
25def 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.