Skip to content

Commit

Permalink
Fix/custom tests (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrosjean authored Oct 18, 2023
1 parent 32b7737 commit c1c6296
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion meltano.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1
send_anonymous_usage_stats: true
send_anonymous_usage_stats: false
project_id: tap-getresponse
default_environment: dev
environments:
Expand Down
3 changes: 0 additions & 3 deletions tests/conftest.py

This file was deleted.

26 changes: 17 additions & 9 deletions tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
"""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

SAMPLE_CONFIG = {
"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()

0 comments on commit c1c6296

Please sign in to comment.