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

🐛 Source Asana: fix request-cache test #18375

Merged
merged 3 commits into from
Oct 25, 2022
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 airbyte-integrations/connectors/source-asana/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk",
"airbyte-cdk~=0.2",
]

TEST_REQUIREMENTS = ["pytest~=6.1", "requests-mock~=1.9.3", "source-acceptance-test"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
from unittest.mock import patch, PropertyMock

from airbyte_cdk.logger import AirbyteLogger
from source_asana.source import SourceAsana
Expand All @@ -26,10 +27,11 @@ def test_check_connection_empty_config(config):


def test_check_connection_exception(config):
ok, error_msg = SourceAsana().check_connection(logger, config=config)
with patch('source_asana.streams.Workspaces.use_cache', new_callable=PropertyMock, return_value=False):
ok, error_msg = SourceAsana().check_connection(logger, config=config)

assert not ok
assert error_msg
assert not ok
assert error_msg


def test_streams(config):
Expand Down