Exemple #1
0
 def test_after_fork_cleanup_app__raises(self, logger):
     self.app._after_fork = Mock(name='_after_fork')
     exc = self.app._after_fork.side_effect = KeyError()
     _appbase._after_fork_cleanup_app(self.app)
     logger.info.assert_called_with('after forker raised exception: %r',
                                    exc,
                                    exc_info=1)
Exemple #2
0
 def test_global_after_fork(self):
     self.app._after_fork = Mock(name='_after_fork')
     _appbase._after_fork_cleanup_app(self.app)
     self.app._after_fork.assert_called_with()
Exemple #3
0
 def test_after_fork_cleanup_app__raises(self, logger):
     self.app._after_fork = Mock(name='_after_fork')
     exc = self.app._after_fork.side_effect = KeyError()
     _appbase._after_fork_cleanup_app(self.app)
     logger.info.assert_called_with(
         'after forker raised exception: %r', exc, exc_info=1)
Exemple #4
0
 def test_global_after_fork(self):
     self.app._after_fork = Mock(name='_after_fork')
     _appbase._after_fork_cleanup_app(self.app)
     self.app._after_fork.assert_called_with()