Back to index

plone3  3.1.7
testSkeleton.py
Go to the documentation of this file.
00001 #
00002 # Skeleton PloneTestCase
00003 #
00004 
00005 import os, sys
00006 if __name__ == '__main__':
00007     execfile(os.path.join(sys.path[0], 'framework.py'))
00008 
00009 from Products.PloneTestCase import PloneTestCase
00010 
00011 PloneTestCase.installProduct('SomeProduct')
00012 PloneTestCase.setupPloneSite()
00013 
00014 
00015 class TestSomeProduct(PloneTestCase.PloneTestCase):
00016 
00017     def afterSetUp(self):
00018         pass
00019 
00020     def testSomething(self):
00021         # Test something
00022         self.assertEqual(1+1, 2)
00023 
00024 
00025 def test_suite():
00026     from unittest import TestSuite, makeSuite
00027     suite = TestSuite()
00028     suite.addTest(makeSuite(TestSomeProduct))
00029     return suite
00030 
00031 if __name__ == '__main__':
00032     framework()
00033