Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/custom tests #10

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()