Skip to content

Commit

Permalink
test(pep0249): Update database name parameters for test PEP0249 support.
Browse files Browse the repository at this point in the history
Garantees that PEP0249 can test all options for database parameter name
during the connection. For that, the following will be used:

* test_psycopg2.py will test 'dbname'
* test_mysqlclient.py will test 'db'
* test_pymysql.py will test 'database' (since 'db'name is deprecated)

Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
  • Loading branch information
pvital committed Oct 18, 2023
1 parent 0406b13 commit 221432e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/clients/test_psycopg2.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TestPsycoPG2(unittest.TestCase):
def setUp(self):
self.db = psycopg2.connect(host=testenv['postgresql_host'], port=testenv['postgresql_port'],
user=testenv['postgresql_user'], password=testenv['postgresql_pw'],
database=testenv['postgresql_db'])
dbname=testenv['postgresql_db'])

database_setup_query = """
DROP TABLE IF EXISTS users;
Expand Down
2 changes: 1 addition & 1 deletion tests/clients/test_pymysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TestPyMySQL(unittest.TestCase):
def setUp(self):
self.db = pymysql.connect(host=testenv['mysql_host'], port=testenv['mysql_port'],
user=testenv['mysql_user'], passwd=testenv['mysql_pw'],
db=testenv['mysql_db'])
database=testenv['mysql_db'])
database_setup_query = """
DROP TABLE IF EXISTS users; |
CREATE TABLE users(
Expand Down

0 comments on commit 221432e

Please sign in to comment.