

def test_callproc(self):
    con = self._connect()
    try:
        cur = con.cursor()
        if (self.lower_func and hasattr(cur, 'callproc')):
            r = cur.callproc(self.lower_func, ('FOO',))
            self.assertEqual(len(r), 1)
            self.assertEqual(r[0], 'FOO')
            r = cur.fetchall()
            self.assertEqual(len(r), 1, 'callproc produced no result set')
            self.assertEqual(len(r[0]), 1, 'callproc produced invalid result set')
            self.assertEqual(r[0][0], 'foo', 'callproc produced invalid results')
    finally:
        con.close()

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/MySQL-python-1.2.5/tests/dbapi20.py DatabaseAPI20Test.test_callproc/original