Exemple #1
0
 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')
Exemple #2
0
 def test_with_rows(self):
     cur = cursor.MySQLCursorBuffered()
     self.assertFalse(cur.with_rows)
     cur._rows = [('ham', )]
     self.assertTrue(cur.with_rows)
Exemple #3
0
 def setUp(self):
     self.cur = cursor.MySQLCursorBuffered(connection=None)
     self.cnx = None
Exemple #4
0
 def test_init(self):
     """MySQLCursorBuffered object init"""
     try:
         c = cursor.MySQLCursorBuffered(connection=None)
     except (SyntaxError, TypeError), e:
         self.fail("Failed initializing MySQLCursorBuffered; %s" % e)
Exemple #5
0
 def setUp(self):
     self.c = cursor.MySQLCursorBuffered(db=None)
     self.db = None