Skip to content

Commit

Permalink
Fix tests for SDK version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenFrankel committed May 12, 2023
1 parent d95fbe5 commit 77b8c4c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tap_google_sheets/tests/test_child_sheet_name_setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unittest

import responses
import singer
import singer_sdk._singerlib as singer

import tap_google_sheets.tests.utils as test_utils
from tap_google_sheets.tap import TapGoogleSheets
Expand Down
2 changes: 1 addition & 1 deletion tap_google_sheets/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_base_credentials_discovery(self):
status=200,
)

catalog = TapGoogleSheets(self.mock_config).discover_streams()
catalog = TapGoogleSheets(config=self.mock_config).discover_streams()

# expect valid catalog to be discovered
self.assertEqual(len(catalog), 1, "Total streams from default catalog")
Expand Down
2 changes: 1 addition & 1 deletion tap_google_sheets/tests/test_discovered_stream_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unittest

import responses
import singer
import singer_sdk._singerlib as singer

import tap_google_sheets.tests.utils as test_utils
from tap_google_sheets.tap import TapGoogleSheets
Expand Down
11 changes: 5 additions & 6 deletions tap_google_sheets/tests/test_ignoring_unnamed_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unittest

import responses
import singer
import singer_sdk._singerlib as singer

import tap_google_sheets.tests.utils as test_utils
from tap_google_sheets.tap import TapGoogleSheets
Expand Down Expand Up @@ -59,19 +59,18 @@ def test_ignoring_unnamed_columns(self):

tap.sync_all()

self.assertEqual(len(test_utils.SINGER_MESSAGES), 6)
self.assertEqual(len(test_utils.SINGER_MESSAGES), 5)
self.assertIsInstance(test_utils.SINGER_MESSAGES[0], singer.SchemaMessage)
self.assertIsInstance(test_utils.SINGER_MESSAGES[1], singer.SchemaMessage)
self.assertIsInstance(test_utils.SINGER_MESSAGES[2], singer.RecordMessage)
self.assertIsInstance(test_utils.SINGER_MESSAGES[3], singer.StateMessage)
self.assertIsInstance(test_utils.SINGER_MESSAGES[4], singer.RecordMessage)
self.assertIsInstance(test_utils.SINGER_MESSAGES[5], singer.StateMessage)
self.assertIsInstance(test_utils.SINGER_MESSAGES[3], singer.RecordMessage)
self.assertIsInstance(test_utils.SINGER_MESSAGES[4], singer.StateMessage)

# Assert that the second unnamed column and its values are ignored
self.assertEquals(
test_utils.SINGER_MESSAGES[2].record, {"Column_One": "1", "Column_Two": "1"}
)

self.assertEquals(
test_utils.SINGER_MESSAGES[4].record, {"Column_One": "2", "Column_Two": "2"}
test_utils.SINGER_MESSAGES[3].record, {"Column_One": "2", "Column_Two": "2"}
)
2 changes: 1 addition & 1 deletion tap_google_sheets/tests/test_table_name_setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unittest

import responses
import singer
import singer_sdk._singerlib as singer

import tap_google_sheets.tests.utils as test_utils
from tap_google_sheets.tap import TapGoogleSheets
Expand Down
2 changes: 1 addition & 1 deletion tap_google_sheets/tests/test_underscoring_column_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unittest

import responses
import singer
import singer_sdk._singerlib as singer

import tap_google_sheets.tests.utils as test_utils
from tap_google_sheets.tap import TapGoogleSheets
Expand Down
2 changes: 1 addition & 1 deletion tap_google_sheets/tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Test utilities."""

from singer_sdk._singerlib.catalog import Catalog
from singer_sdk.helpers import _catalog
from singer_sdk.helpers._singer import Catalog

from tap_google_sheets.tap import TapGoogleSheets

Expand Down

0 comments on commit 77b8c4c

Please sign in to comment.