Exemplo n.º 1
0
 def test_run_query(self):
     '''
     Test for Run SQL query and return result
     '''
     with patch.object(oracle, '_connect', MagicMock()) as mock_connect:
         mock_connect.cursor.execute.fetchall.return_value = True
         with patch.object(oracle, 'show_dbs', MagicMock()):
             self.assertTrue(oracle.run_query('db', 'query'))
Exemplo n.º 2
0
 def test_run_query(self):
     '''
     Test for Run SQL query and return result
     '''
     with patch.object(oracle, '_connect', MagicMock()) as mock_connect:
         mock_connect.cursor.execute.fetchall.return_value = True
         with patch.object(oracle, 'show_dbs', MagicMock()):
             self.assertTrue(oracle.run_query('db', 'query'))
Exemplo n.º 3
0
 def test_run_query(self):
     """
     Test for Run SQL query and return result
     """
     with patch.object(oracle, "_connect", MagicMock()) as mock_connect:
         mock_connect.cursor.execute.fetchall.return_value = True
         with patch.object(oracle, "show_dbs", MagicMock()):
             self.assertTrue(oracle.run_query("db", "query"))