-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Source Stripe: add availability strategy (#28911)
* Connector health: source hubspot, gitlab, snapchat-marketing: fix builds * source stripe: add availaility strategy * upd changelog * update error message map * update availability strategy
- Loading branch information
Showing
10 changed files
with
142 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
airbyte-integrations/connectors/source-stripe/unit_tests/conftest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
import pytest | ||
from airbyte_cdk.sources.streams.http.auth import TokenAuthenticator | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
def disable_cache(mocker): | ||
mocker.patch( | ||
"source_stripe.streams.Customers.use_cache", | ||
new_callable=mocker.PropertyMock, | ||
return_value=False | ||
) | ||
mocker.patch( | ||
"source_stripe.streams.Transfers.use_cache", | ||
new_callable=mocker.PropertyMock, | ||
return_value=False | ||
) | ||
mocker.patch( | ||
"source_stripe.streams.Subscriptions.use_cache", | ||
new_callable=mocker.PropertyMock, | ||
return_value=False | ||
) | ||
mocker.patch( | ||
"source_stripe.streams.SubscriptionItems.use_cache", | ||
new_callable=mocker.PropertyMock, | ||
return_value=False | ||
) | ||
|
||
|
||
@pytest.fixture(name="config") | ||
def config_fixture(): | ||
config = {"client_secret": "sk_test(live)_<secret>", | ||
"account_id": "<account_id>", "start_date": "2020-05-01T00:00:00Z"} | ||
return config | ||
|
||
|
||
@pytest.fixture(name="stream_args") | ||
def stream_args_fixture(): | ||
authenticator = TokenAuthenticator("sk_test(live)_<secret>") | ||
args = { | ||
"authenticator": authenticator, | ||
"account_id": "<account_id>", | ||
"start_date": 1588315041, | ||
"slice_range": 365, | ||
} | ||
return args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters