コード例 #1
0
 def test_fetch_data(self):
     cursor = mock.MagicMock()
     result = ["a", "b"]
     cursor.fetchall.return_value = result
     assert OracleEngineSpec.fetch_data(cursor) == result
コード例 #2
0
 def test_fetch_data_no_description(self):
     cursor = mock.MagicMock()
     cursor.description = []
     assert OracleEngineSpec.fetch_data(cursor) == []