Inserting NULL into non NULLABLE column
()
| 28 | |
| 29 | |
| 30 | def test_null(): |
| 31 | """Inserting NULL into non NULLABLE column""" |
| 32 | # https://github.com/PyMySQL/mysqlclient/issues/535 |
| 33 | table_name = "test_null" |
| 34 | conn = connect() |
| 35 | cursor = conn.cursor() |
| 36 | |
| 37 | cursor.execute(f"create table {table_name} (c1 int primary key)") |
| 38 | _tables.append(table_name) |
| 39 | |
| 40 | with pytest.raises(MySQLdb.IntegrityError): |
| 41 | cursor.execute(f"insert into {table_name} values (null)") |
| 42 | |
| 43 | |
| 44 | def test_duplicated_pk(): |