Skip to content

Commit

Permalink
remove unfinished test
Browse files Browse the repository at this point in the history
Signed-off-by: Caleb Grant <[email protected]>
  • Loading branch information
geocoug committed Jul 17, 2024
1 parent 7ec7ad9 commit c6567f8
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions tests/test_pg_upsert.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dotenv import load_dotenv
from psycopg2.sql import SQL, Identifier, Literal

from pg_upsert.pg_upsert import PostgresDB, upsert
from pg_upsert.pg_upsert import PostgresDB

load_dotenv()

Expand Down Expand Up @@ -130,23 +130,23 @@ def test_db_dataframe_params(db):
assert df["two"][0] == 2


def test_upsert_no_commit(global_variables, db):
# Run the upsert function. The function should raise a SystemExit error that
# qa checks failed.
with pytest.raises(SystemExit) as exc_info:
upsert(
host=global_variables["POSTGRES_HOST"],
database=global_variables["POSTGRES_DB"],
user=global_variables["POSTGRES_USER"],
passwd=global_variables["POSTGRES_PASSWORD"],
tables=["genres", "authors", "books", "book_authors"],
stg_schema="staging",
base_schema="public",
upsert_method="upsert",
commit=False,
interactive=False,
exclude_cols=[],
exclude_null_check_colls=[],
)
assert exc_info.type is SystemExit
assert exc_info.value.code == 1
# def test_upsert_no_commit(global_variables, db):
# # Run the upsert function. The function should raise a SystemExit error that
# # qa checks failed.
# with pytest.raises(SystemExit) as exc_info:
# upsert(
# host=global_variables["POSTGRES_HOST"],
# database=global_variables["POSTGRES_DB"],
# user=global_variables["POSTGRES_USER"],
# passwd=global_variables["POSTGRES_PASSWORD"],
# tables=["genres", "authors", "books", "book_authors"],
# stg_schema="staging",
# base_schema="public",
# upsert_method="upsert",
# commit=False,
# interactive=False,
# exclude_cols=[],
# exclude_null_check_colls=[],
# )
# assert exc_info.type is SystemExit
# assert exc_info.value.code == 1

0 comments on commit c6567f8

Please sign in to comment.