예제 #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) == []