1
0
mirror of synced 2026-01-02 21:02:43 -05:00
Files
airbyte/airbyte-integrations/connectors/source-adjust/unit_tests/test_source.py
Cole Snodgrass 2e099acc52 update headers from 2022 -> 2023 (#22594)
* It's 2023!

* 2022 -> 2023

---------

Co-authored-by: evantahler <evan@airbyte.io>
2023-02-08 13:01:16 -08:00

27 lines
594 B
Python

#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from unittest import mock
from source_adjust.source import SourceAdjust
API_KEY = "API KEY"
CONFIG = {
"api_token": API_KEY,
}
def test_check_connection():
source = SourceAdjust()
with mock.patch("requests.get") as http_get:
assert source.check_connection(mock.MagicMock(), CONFIG) == (True, None)
assert http_get.call_count == 1
def test_streams():
source = SourceAdjust()
streams = source.streams(CONFIG)
expected_streams_number = 1
assert len(streams) == expected_streams_number