|  | @@ -63,7 +63,15 @@ class TestApp(BaseTestApp):
 | 
	
		
			
			| 63 | 63 |  
 | 
	
		
			
			| 64 | 64 |  def load_app(name=application_name):
 | 
	
		
			
			| 65 | 65 |      """Load the test application."""
 | 
	
		
			
			| 66 |  | -    return TestApp(loadapp('config:test.ini#%s' % name, relative_to=getcwd()))
 | 
	
		
			
			|  | 66 | +    return TestApp(
 | 
	
		
			
			|  | 67 | +        loadapp(
 | 
	
		
			
			|  | 68 | +            'config:test.ini#%s' % name,
 | 
	
		
			
			|  | 69 | +            relative_to=getcwd(),
 | 
	
		
			
			|  | 70 | +            global_conf={
 | 
	
		
			
			|  | 71 | +                'test': 'true',
 | 
	
		
			
			|  | 72 | +            },
 | 
	
		
			
			|  | 73 | +        )
 | 
	
		
			
			|  | 74 | +    )
 | 
	
		
			
			| 67 | 75 |  
 | 
	
		
			
			| 68 | 76 |  
 | 
	
		
			
			| 69 | 77 |  def setup_app(section_name=None):
 | 
	
	
		
			
			|  | @@ -156,6 +164,7 @@ def teardown_db():
 | 
	
		
			
			| 156 | 164 |              logger.debug(teardown_db, 'Exception while trying to remove sequence {}'.format(sequence.name))
 | 
	
		
			
			| 157 | 165 |  
 | 
	
		
			
			| 158 | 166 |      transaction.commit()
 | 
	
		
			
			|  | 167 | +    connection.close()
 | 
	
		
			
			| 159 | 168 |      engine.dispose()
 | 
	
		
			
			| 160 | 169 |  
 | 
	
		
			
			| 161 | 170 |  
 | 
	
	
		
			
			|  | @@ -249,6 +258,9 @@ class TestController(object):
 | 
	
		
			
			| 249 | 258 |          DBSession.close()
 | 
	
		
			
			| 250 | 259 |          daemons.execute_in_thread('radicale', lambda: transaction.commit())
 | 
	
		
			
			| 251 | 260 |          teardown_db()
 | 
	
		
			
			|  | 261 | +        transaction.commit()
 | 
	
		
			
			|  | 262 | +        DBSession.close_all()
 | 
	
		
			
			|  | 263 | +        config['tg.app_globals'].sa_engine.dispose()
 | 
	
		
			
			| 252 | 264 |  
 | 
	
		
			
			| 253 | 265 |  
 | 
	
		
			
			| 254 | 266 |  class TracimTestController(TestController):
 |