source: products/qMemberdataExport/trunk/tests/testInstallation.py

Last change on this file was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1
2""" This module contains class that tests product's installation  procedure """
3
4import os, sys, string
5if __name__ == '__main__':
6    execfile(os.path.join(sys.path[0], 'framework.py'))
7
8from commonTestingStuff import *
9
10class TestInstallation(PloneTestCase.PloneTestCase):
11    """ Class for testing installation procedure """
12
13    def afterSetUp(self):
14        """ AfterSetUp features """
15        self.qi = getToolByName(self.portal, 'portal_quickinstaller')
16        self.qi.installProduct(PRODUCT)
17
18    def testAddingExternalMethod(self):
19        """ Test adding external method to portal """
20        self.failUnless(EXTERNAL_METHOD in self.portal.objectIds(),
21                        '%s external method does not exist in portal' % EXTERNAL_METHOD)
22
23    def testMemberdataHandlersRegistry(self):
24        """ Test registration of memberdata handlers """
25        from Products.qMemberdataExport import getRegisteredMemberdataHandlers as registry
26        self.failUnless(len(registry()) == 3, 'Bad registry data')
27
28#tests.append(TestInstallation)
29
30def test_suite():
31    from unittest import TestSuite, makeSuite
32    suite = TestSuite()
33    suite.addTest(makeSuite(TestInstallation))
34    return suite
35
36if __name__ == '__main__':
37    framework()
Note: See TracBrowser for help on using the repository browser.