From 1fdb6685897e5f3970fa63d82e73193d84b26ada Mon Sep 17 00:00:00 2001 From: Reuben Frankel Date: Tue, 12 Nov 2024 13:14:53 +0000 Subject: [PATCH] Fix tests --- tap_google_sheets/tests/test_child_sheet_name_setting.py | 3 +-- tap_google_sheets/tests/test_discovered_stream_name.py | 3 +-- tap_google_sheets/tests/test_ignoring_unnamed_columns.py | 3 +-- tap_google_sheets/tests/test_table_name_setting.py | 3 +-- tap_google_sheets/tests/test_underscoring_column_names.py | 3 +-- tap_google_sheets/tests/utils.py | 2 +- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tap_google_sheets/tests/test_child_sheet_name_setting.py b/tap_google_sheets/tests/test_child_sheet_name_setting.py index 3bbebaa..83413c1 100644 --- a/tap_google_sheets/tests/test_child_sheet_name_setting.py +++ b/tap_google_sheets/tests/test_child_sheet_name_setting.py @@ -4,7 +4,6 @@ import responses import singer_sdk._singerlib as singer -import singer_sdk.io_base as io import tap_google_sheets.tests.utils as test_utils from tap_google_sheets.tap import TapGoogleSheets @@ -27,7 +26,7 @@ def setUp(self): responses.reset() del test_utils.SINGER_MESSAGES[:] - io.singer_write_message = test_utils.accumulate_singer_messages + TapGoogleSheets.write_message = test_utils.accumulate_singer_messages @responses.activate() def test_discovered_stream_name(self): diff --git a/tap_google_sheets/tests/test_discovered_stream_name.py b/tap_google_sheets/tests/test_discovered_stream_name.py index 3f26f38..898c16c 100644 --- a/tap_google_sheets/tests/test_discovered_stream_name.py +++ b/tap_google_sheets/tests/test_discovered_stream_name.py @@ -3,7 +3,6 @@ import unittest import responses -import singer_sdk.io_base as io import tap_google_sheets.tests.utils as test_utils from tap_google_sheets.tap import TapGoogleSheets @@ -18,7 +17,7 @@ def setUp(self): responses.reset() del test_utils.SINGER_MESSAGES[:] - io.singer_write_message = test_utils.accumulate_singer_messages + TapGoogleSheets.write_message = test_utils.accumulate_singer_messages @responses.activate() def test_discovered_stream_name(self): diff --git a/tap_google_sheets/tests/test_ignoring_unnamed_columns.py b/tap_google_sheets/tests/test_ignoring_unnamed_columns.py index d4c5d28..ec1bde9 100644 --- a/tap_google_sheets/tests/test_ignoring_unnamed_columns.py +++ b/tap_google_sheets/tests/test_ignoring_unnamed_columns.py @@ -4,7 +4,6 @@ import responses import singer_sdk._singerlib as singer -import singer_sdk.io_base as io import tap_google_sheets.tests.utils as test_utils from tap_google_sheets.tap import TapGoogleSheets @@ -19,7 +18,7 @@ def setUp(self): responses.reset() del test_utils.SINGER_MESSAGES[:] - io.singer_write_message = test_utils.accumulate_singer_messages + TapGoogleSheets.write_message = test_utils.accumulate_singer_messages @responses.activate() def test_ignoring_unnamed_columns(self): diff --git a/tap_google_sheets/tests/test_table_name_setting.py b/tap_google_sheets/tests/test_table_name_setting.py index 28bc2db..2fa1cef 100644 --- a/tap_google_sheets/tests/test_table_name_setting.py +++ b/tap_google_sheets/tests/test_table_name_setting.py @@ -3,7 +3,6 @@ import unittest import responses -import singer_sdk.io_base as io import tap_google_sheets.tests.utils as test_utils from tap_google_sheets.tap import TapGoogleSheets @@ -19,7 +18,7 @@ def setUp(self): responses.reset() del test_utils.SINGER_MESSAGES[:] - io.singer_write_message = test_utils.accumulate_singer_messages + TapGoogleSheets.write_message = test_utils.accumulate_singer_messages @responses.activate() def test_output_name(self): diff --git a/tap_google_sheets/tests/test_underscoring_column_names.py b/tap_google_sheets/tests/test_underscoring_column_names.py index d1f75c3..d112e63 100644 --- a/tap_google_sheets/tests/test_underscoring_column_names.py +++ b/tap_google_sheets/tests/test_underscoring_column_names.py @@ -4,7 +4,6 @@ import responses import singer_sdk._singerlib as singer -import singer_sdk.io_base as io import tap_google_sheets.tests.utils as test_utils from tap_google_sheets.tap import TapGoogleSheets @@ -19,7 +18,7 @@ def setUp(self): responses.reset() del test_utils.SINGER_MESSAGES[:] - io.singer_write_message = test_utils.accumulate_singer_messages + TapGoogleSheets.write_message = test_utils.accumulate_singer_messages @responses.activate() def test_underscoring_column_names(self): diff --git a/tap_google_sheets/tests/utils.py b/tap_google_sheets/tests/utils.py index 0f0462b..16f5636 100644 --- a/tap_google_sheets/tests/utils.py +++ b/tap_google_sheets/tests/utils.py @@ -17,7 +17,7 @@ } -def accumulate_singer_messages(message): +def accumulate_singer_messages(_, message): """Collect singer library write_message in tests.""" SINGER_MESSAGES.append(message)