Esempio n. 1
0
 def test_after_execute_with_sql_result(self, mock_profiler):
     handler = sqlalchemy._after_cursor_execute(hide_result=False)
     cursor = mock.MagicMock()
     cursor._rows = (1, )
     handler(1, cursor, 2, 3, 4, 5)
     info = {"db": {"result": str(cursor._rows)}}
     mock_profiler.stop.assert_called_once_with(info=info)
Esempio n. 2
0
 def test_after_execute(self, mock_profiler):
     handler = sqlalchemy._after_cursor_execute()
     handler(mock.MagicMock(), 1, 2, 3, 4, 5)
     mock_profiler.stop.assert_called_once_with()
 def test_after_execute(self, mock_profiler):
     handler = sqlalchemy._after_cursor_execute()
     handler(mock.MagicMock(), 1, 2, 3, 4, 5)
     mock_profiler.stop.assert_called_once_with()