| 
									
										
										
										
											2009-11-11 20:22:13 +01:00
										 |  |  | <!codeHeader!> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | from unittest import TestSuite | 
					
						
							|  |  |  | from Testing import ZopeTestCase | 
					
						
							|  |  |  | from Testing.ZopeTestCase import ZopeDocTestSuite | 
					
						
							| 
									
										
										
										
											2011-12-05 15:11:29 +01:00
										 |  |  | from appy.gen.mixins.TestMixin import TestMixin, beforeTest, afterTest | 
					
						
							| 
									
										
										
										
											2009-11-11 20:22:13 +01:00
										 |  |  | <!imports!> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-05 15:11:29 +01:00
										 |  |  | # Initialize the Zope test system ---------------------------------------------- | 
					
						
							| 
									
										
										
										
											2011-10-19 09:37:44 +02:00
										 |  |  | ZopeTestCase.installProduct('<!applicationName!>') | 
					
						
							| 
									
										
										
										
											2009-11-11 20:22:13 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-05 15:11:29 +01:00
										 |  |  | class Test(ZopeTestCase.ZopeTestCase, TestMixin): | 
					
						
							| 
									
										
										
										
											2009-11-11 20:22:13 +01:00
										 |  |  |     '''Base test class for <!applicationName!> test cases.''' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Data needed for defining the tests ------------------------------------------- | 
					
						
							|  |  |  | data = {'test_class': Test, 'setUp': beforeTest, 'tearDown': afterTest, | 
					
						
							|  |  |  |         'globs': {'appName': '<!applicationName!>'}} | 
					
						
							|  |  |  | modulesWithTests = [<!modulesWithTests!>] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # ------------------------------------------------------------------------------ | 
					
						
							|  |  |  | def test_suite(): | 
					
						
							|  |  |  |     return TestSuite([ZopeDocTestSuite(m, **data) for m in modulesWithTests]) | 
					
						
							|  |  |  | # ------------------------------------------------------------------------------ |