1
0
mirror of synced 2025-12-25 02:09:19 -05:00

Source Freshdesk : Migrate to Manifest-only (#54687)

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
This commit is contained in:
Tope Folorunso
2025-03-12 19:47:32 +01:00
committed by GitHub
parent d44bf95ce8
commit c6c824241b
52 changed files with 6380 additions and 3910 deletions

View File

@@ -1,30 +1,3 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
import pytest
from requests.auth import HTTPBasicAuth
from source_freshdesk.source import SourceFreshdesk
# Copyright (c) 2024 Airbyte, Inc., all rights reserved.
@pytest.fixture(name="config")
def config_fixture():
return {"domain": "test.freshdesk.com", "api_key": "secret_api_key", "requests_per_minute": 50, "start_date": "2002-02-10T22:21:44Z"}
@pytest.fixture(name="authenticator")
def authenticator_fixture(config):
return HTTPBasicAuth(username=config["api_key"], password="unused_with_api_key")
def find_stream(stream_name, config):
streams = SourceFreshdesk().streams(config=config)
# cache should be disabled once this issue is fixed https://github.com/airbytehq/airbyte-internal-issues/issues/6513
for stream in streams:
stream.retriever.requester.use_cache = True
# find by name
for stream in streams:
if stream.name == stream_name:
return stream
raise ValueError(f"Stream {stream_name} not found")
pytest_plugins = ["airbyte_cdk.test.utils.manifest_only_fixtures"]