| 203 | |
| 204 | |
| 205 | class TestCursor(base.PyMySQLTestCase): |
| 206 | # this test case does not work quite right yet, however, |
| 207 | # we substitute in None for the erroneous field which is |
| 208 | # compatible with the DB-API 2.0 spec and has not broken |
| 209 | # any unit tests for anything we've tried. |
| 210 | |
| 211 | # def test_description(self): |
| 212 | # """ test description attribute """ |
| 213 | # # result is from MySQLdb module |
| 214 | # r = (('Host', 254, 11, 60, 60, 0, 0), |
| 215 | # ('User', 254, 16, 16, 16, 0, 0), |
| 216 | # ('Password', 254, 41, 41, 41, 0, 0), |
| 217 | # ('Select_priv', 254, 1, 1, 1, 0, 0), |
| 218 | # ('Insert_priv', 254, 1, 1, 1, 0, 0), |
| 219 | # ('Update_priv', 254, 1, 1, 1, 0, 0), |
| 220 | # ('Delete_priv', 254, 1, 1, 1, 0, 0), |
| 221 | # ('Create_priv', 254, 1, 1, 1, 0, 0), |
| 222 | # ('Drop_priv', 254, 1, 1, 1, 0, 0), |
| 223 | # ('Reload_priv', 254, 1, 1, 1, 0, 0), |
| 224 | # ('Shutdown_priv', 254, 1, 1, 1, 0, 0), |
| 225 | # ('Process_priv', 254, 1, 1, 1, 0, 0), |
| 226 | # ('File_priv', 254, 1, 1, 1, 0, 0), |
| 227 | # ('Grant_priv', 254, 1, 1, 1, 0, 0), |
| 228 | # ('References_priv', 254, 1, 1, 1, 0, 0), |
| 229 | # ('Index_priv', 254, 1, 1, 1, 0, 0), |
| 230 | # ('Alter_priv', 254, 1, 1, 1, 0, 0), |
| 231 | # ('Show_db_priv', 254, 1, 1, 1, 0, 0), |
| 232 | # ('Super_priv', 254, 1, 1, 1, 0, 0), |
| 233 | # ('Create_tmp_table_priv', 254, 1, 1, 1, 0, 0), |
| 234 | # ('Lock_tables_priv', 254, 1, 1, 1, 0, 0), |
| 235 | # ('Execute_priv', 254, 1, 1, 1, 0, 0), |
| 236 | # ('Repl_slave_priv', 254, 1, 1, 1, 0, 0), |
| 237 | # ('Repl_client_priv', 254, 1, 1, 1, 0, 0), |
| 238 | # ('Create_view_priv', 254, 1, 1, 1, 0, 0), |
| 239 | # ('Show_view_priv', 254, 1, 1, 1, 0, 0), |
| 240 | # ('Create_routine_priv', 254, 1, 1, 1, 0, 0), |
| 241 | # ('Alter_routine_priv', 254, 1, 1, 1, 0, 0), |
| 242 | # ('Create_user_priv', 254, 1, 1, 1, 0, 0), |
| 243 | # ('Event_priv', 254, 1, 1, 1, 0, 0), |
| 244 | # ('Trigger_priv', 254, 1, 1, 1, 0, 0), |
| 245 | # ('ssl_type', 254, 0, 9, 9, 0, 0), |
| 246 | # ('ssl_cipher', 252, 0, 65535, 65535, 0, 0), |
| 247 | # ('x509_issuer', 252, 0, 65535, 65535, 0, 0), |
| 248 | # ('x509_subject', 252, 0, 65535, 65535, 0, 0), |
| 249 | # ('max_questions', 3, 1, 11, 11, 0, 0), |
| 250 | # ('max_updates', 3, 1, 11, 11, 0, 0), |
| 251 | # ('max_connections', 3, 1, 11, 11, 0, 0), |
| 252 | # ('max_user_connections', 3, 1, 11, 11, 0, 0)) |
| 253 | # conn = self.connect() |
| 254 | # c = conn.cursor() |
| 255 | # c.execute("select * from mysql.user") |
| 256 | # |
| 257 | # self.assertEqual(r, c.description) |
| 258 | |
| 259 | def test_fetch_no_result(self): |
| 260 | """test a fetchone() with no rows""" |
| 261 | conn = self.connect() |
| 262 | c = conn.cursor() |
nothing calls this directly
no outgoing calls
no test coverage detected