diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fe8f7e..53c4d79 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Poetry run: | - pip install poetry + pipx install poetry - name: Install dependencies run: | poetry install diff --git a/meltano.yml b/meltano.yml index ba39d77..b0aa7de 100644 --- a/meltano.yml +++ b/meltano.yml @@ -1,5 +1,5 @@ version: 1 -send_anonymous_usage_stats: true +send_anonymous_usage_stats: false project_id: tap-getresponse default_environment: dev environments: diff --git a/tests/conftest.py b/tests/conftest.py deleted file mode 100644 index 6bb3ec2..0000000 --- a/tests/conftest.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Test Configuration.""" - -pytest_plugins = ("singer_sdk.testing.pytest_plugin",) diff --git a/tests/test_core.py b/tests/test_core.py index dc1eecd..55621d9 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,8 +1,9 @@ -"""Tests standard tap features using the built-in SDK tests library.""" +"""Tests standard tap features using the built-in SDK tests library -import os +Source: https://github.com/meltano/sdk/blob/main/singer_sdk/testing/tap_tests.py +""" -from singer_sdk.testing import get_tap_test_class +import os from tap_getresponse.tap import TapGetResponse @@ -10,12 +11,19 @@ "auth_token": os.getenv("TAP_GETRESPONSE_AUTH_TOKEN"), } +tap = TapGetResponse(config=SAMPLE_CONFIG) + -# Run standard built-in tap tests from the SDK: -TestTapGetResponse = get_tap_test_class( - tap_class=TapGetResponse, - config=SAMPLE_CONFIG, -) +def test_tap_cli_prints() -> None: + """Test that the tap is able to print standard metadata.""" + tap.print_version() + tap.print_about() + tap.print_about(output_format="json") -# TODO: Create additional tests as appropriate for your tap. +def test_tap_stream_connection() -> None: + """ + Test that the tap can connect to each stream. + Run connection test, aborting each stream after 1 record. + """ + tap.run_connection_test()