chore: enable lint PT009 'use regular assert over self.assert.*' (#30521)

This commit is contained in:
Maxime Beauchemin
2024-10-07 13:17:27 -07:00
committed by GitHub
parent 1f013055d2
commit a849c29288
62 changed files with 2218 additions and 2422 deletions

View File

@@ -30,8 +30,8 @@ class TestMySQLEngineSpecsDbEngineSpec(TestDbEngineSpec):
)
def test_get_datatype_mysql(self):
"""Tests related to datatype mapping for MySQL"""
self.assertEqual("TINY", MySQLEngineSpec.get_datatype(1))
self.assertEqual("VARCHAR", MySQLEngineSpec.get_datatype(15))
assert "TINY" == MySQLEngineSpec.get_datatype(1)
assert "VARCHAR" == MySQLEngineSpec.get_datatype(15)
def test_column_datatype_to_string(self):
test_cases = (
@@ -49,7 +49,7 @@ class TestMySQLEngineSpecsDbEngineSpec(TestDbEngineSpec):
actual = MySQLEngineSpec.column_datatype_to_string(
original, mysql.dialect()
)
self.assertEqual(actual, expected)
assert actual == expected
def test_extract_error_message(self):
from MySQLdb._exceptions import OperationalError