diff --git a/tests/test_integration/test_utils.py b/tests/test_integration/test_utils.py index e195626..1ce5f85 100644 --- a/tests/test_integration/test_utils.py +++ b/tests/test_integration/test_utils.py @@ -29,6 +29,12 @@ TEST_LOLACONFIG = build_lolaconfig(flow_name="testing-suite") @pytest.fixture def connection_with_test_table(): + """ + Connects to DW, creates a test table in the sandbox env, and yields the + connection to the test. + + After the test, the table is dropped and the connection is closed. + """ test_local_bind_host = "127.0.0.1" test_local_bind_port = 12345 @@ -87,9 +93,9 @@ def test_sql_transaction_persists_changes_properly(connection_with_test_table): SELECT a_test_column FROM sandbox.lolafect_transaction_test_table """) - table_has_a_record_after_transaction = bool(cursor.fetchall()) # A non-empty tuple yields True + table_has_a_record_after_commit = bool(cursor.fetchall()) # A non-empty tuple yields True - assert table_is_empty_at_first and table_has_a_record_after_transaction + assert table_is_empty_at_first and table_has_a_record_after_commit def test_sql_transaction_rollbacks_changes_properly(connection_with_test_table): @@ -112,6 +118,6 @@ def test_sql_transaction_rollbacks_changes_properly(connection_with_test_table): SELECT a_test_column FROM sandbox.lolafect_transaction_test_table """) - table_is_empty_after_rollback = not bool(cursor.fetchall()) # A tuple yields False + table_is_still_empty_after_rollback = not bool(cursor.fetchall()) # A tuple yields False - assert table_is_empty_at_first and table_is_empty_after_rollback + assert table_is_empty_at_first and table_is_still_empty_after_rollback