1
0
mirror of synced 2026-01-12 15:02:16 -05:00
Files
airbyte/airbyte-integrations/connector-templates/source-python-http-api/unit_tests/test_source.py.hbs
Denis Davydov 426e9594cb fix build: run gradlew format (#13265)
* fix build: run gradlew format

* Revert "fix build: run gradlew format"

This reverts commit e679b4f26f.

* fix connector template to fix the build
2022-05-27 17:36:43 +03:00

23 lines
655 B
Handlebars

#
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
from unittest.mock import MagicMock
from source_{{snakeCase name}}.source import Source{{properCase name}}
def test_check_connection(mocker):
source = Source{{properCase name}}()
logger_mock, config_mock = MagicMock(), MagicMock()
assert source.check_connection(logger_mock, config_mock) == (True, None)
def test_streams(mocker):
source = Source{{properCase name}}()
config_mock = MagicMock()
streams = source.streams(config_mock)
# TODO: replace this with your streams number
expected_streams_number = 2
assert len(streams) == expected_streams_number