def test_init(self): """MySQLCursorBuffered object init""" try: c = cursor.MySQLCursorBuffered(connection=None) except (SyntaxError, TypeError) as e: self.fail("Failed initializing MySQLCursorBuffered; {}".format(e)) self.assertRaises(errors.InterfaceError, cursor.MySQLCursorBuffered, connection='foo')
def test_with_rows(self): cur = cursor.MySQLCursorBuffered() self.assertFalse(cur.with_rows) cur._rows = [('ham', )] self.assertTrue(cur.with_rows)
def setUp(self): self.cur = cursor.MySQLCursorBuffered(connection=None) self.cnx = None
def test_init(self): """MySQLCursorBuffered object init""" try: c = cursor.MySQLCursorBuffered(connection=None) except (SyntaxError, TypeError), e: self.fail("Failed initializing MySQLCursorBuffered; %s" % e)
def setUp(self): self.c = cursor.MySQLCursorBuffered(db=None) self.db = None