This repository was archived by the owner on Aug 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,9 @@ def test_mysql_explicit_ssl():
5656
5757
5858def test_aiopg_pool_size ():
59- backend = AiopgBackend ("postgresql+aiopg://localhost/database?min_size=1&max_size=20" )
59+ backend = AiopgBackend (
60+ "postgresql+aiopg://localhost/database?min_size=1&max_size=20"
61+ )
6062 kwargs = backend ._get_connection_kwargs ()
6163 assert kwargs == {"minsize" : 1 , "maxsize" : 20 }
6264
Original file line number Diff line number Diff line change @@ -77,9 +77,9 @@ def create_test_database():
7777 # Create test databases with tables creation
7878 for url in DATABASE_URLS :
7979 database_url = DatabaseURL (url )
80- if database_url .dialect == "mysql" :
80+ if database_url .scheme == "mysql" :
8181 url = str (database_url .replace (driver = "pymysql" ))
82- elif database_url .driver == "aiopg" :
82+ elif database_url .scheme == "postgresql+ aiopg" :
8383 url = str (database_url .replace (driver = None ))
8484 engine = sqlalchemy .create_engine (url )
8585 metadata .create_all (engine )
@@ -90,9 +90,9 @@ def create_test_database():
9090 # Drop test databases
9191 for url in DATABASE_URLS :
9292 database_url = DatabaseURL (url )
93- if database_url .dialect == "mysql" :
93+ if database_url .scheme == "mysql" :
9494 url = str (database_url .replace (driver = "pymysql" ))
95- elif database_url .driver == "aiopg" :
95+ elif database_url .scheme == "postgresql+ aiopg" :
9696 url = str (database_url .replace (driver = None ))
9797 engine = sqlalchemy .create_engine (url )
9898 metadata .drop_all (engine )
Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ def create_test_database():
2828 # Create test databases
2929 for url in DATABASE_URLS :
3030 database_url = DatabaseURL (url )
31- if database_url .dialect == "mysql" :
31+ if database_url .scheme == "mysql" :
3232 url = str (database_url .replace (driver = "pymysql" ))
33- elif database_url .driver == "aiopg" :
33+ elif database_url .scheme == "postgresql+ aiopg" :
3434 url = str (database_url .replace (driver = None ))
3535 engine = sqlalchemy .create_engine (url )
3636 metadata .create_all (engine )
@@ -41,9 +41,9 @@ def create_test_database():
4141 # Drop test databases
4242 for url in DATABASE_URLS :
4343 database_url = DatabaseURL (url )
44- if database_url .dialect == "mysql" :
44+ if database_url .scheme == "mysql" :
4545 url = str (database_url .replace (driver = "pymysql" ))
46- elif database_url .driver == "aiopg" :
46+ elif database_url .scheme == "postgresql+ aiopg" :
4747 url = str (database_url .replace (driver = None ))
4848 engine = sqlalchemy .create_engine (url )
4949 metadata .drop_all (engine )
You can’t perform that action at this time.
0 commit comments