Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit bc451cd

Browse files
committed
Tests now use connect() instead of connect_to_uri()
1 parent 27a756e commit bc451cd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/test_database_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626

2727

28-
CONNS = {k: db.connect_to_uri(v, N_THREADS) for k, v in CONN_STRINGS.items()}
28+
CONNS = {k: db.connect.connect(v, N_THREADS) for k, v in CONN_STRINGS.items()}
2929

3030
CONNS[db.MySQL].query("SET @@session.time_zone='+00:00'", None)
3131
oracle.SESSION_TIME_ZONE = postgresql.SESSION_TIME_ZONE = "UTC"

tests/test_diff_tables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import preql
77
import arrow # comes with preql
88

9-
from data_diff.databases import connect_to_uri
9+
from data_diff.databases import connect
1010
from data_diff.diff_tables import TableDiffer, TableSegment, split_space
1111
from data_diff import databases as db
1212
from data_diff.utils import ArithAlphanumeric
@@ -21,7 +21,7 @@
2121
)
2222

2323
DATABASE_URIS = {k.__name__: v for k, v in CONN_STRINGS.items()}
24-
DATABASE_INSTANCES = {k.__name__: connect_to_uri(v, N_THREADS) for k, v in CONN_STRINGS.items()}
24+
DATABASE_INSTANCES = {k.__name__: connect(v, N_THREADS) for k, v in CONN_STRINGS.items()}
2525

2626
TEST_DATABASES = {x.__name__ for x in (db.MySQL, db.PostgreSQL, db.Oracle, db.Redshift, db.Snowflake, db.BigQuery)}
2727

tests/test_postgresql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import unittest
22

3-
from data_diff.databases.connect import connect_to_uri
3+
from data_diff.databases.connect import connect
44
from data_diff import TableSegment, TableDiffer
55
from .common import TEST_POSTGRESQL_CONN_STRING, random_table_suffix
66

77

88
class TestWithConnection(unittest.TestCase):
99
def setUp(self) -> None:
10-
self.connection = connect_to_uri(TEST_POSTGRESQL_CONN_STRING)
10+
self.connection = connect(TEST_POSTGRESQL_CONN_STRING)
1111

1212
self.connection.query('CREATE EXTENSION IF NOT EXISTS "uuid-ossp";', None)
1313

0 commit comments

Comments
 (0)