def test_generate_engine_success(self, mock_engine):
     mockEngine = MagicMock()
     mock_engine.return_value = mockEngine
     testManager = SessionManager()
     testManager.generateEngine()
     testManager.engine.execute.assert_called_once()
     self.assertEqual(testManager.engine, mockEngine)
 def test_generate_engine_error(self, mock_engine):
     testManager = SessionManager()
     with self.assertRaises(Exception):
         testManager.generateEngine()
 def test_generate_engine_success(self, mock_engine):
     testManager = SessionManager()
     testManager.generateEngine()
     self.assertEqual(testManager.engine, 'newEngine')