-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ISSUE #32871] source-stripe streams integration tests
- Loading branch information
Showing
9 changed files
with
463 additions
and
2 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
Empty file.
34 changes: 34 additions & 0 deletions
34
airbyte-integrations/connectors/source-stripe/unit_tests/integration/config.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,34 @@ | ||
from datetime import datetime | ||
from typing import Any, Dict | ||
|
||
|
||
class ConfigBuilder: | ||
def __init__(self) -> None: | ||
self._config: Dict[str, Any] = { | ||
"client_secret": "ConfigBuilder default client secret", | ||
"account_id": "ConfigBuilder default account id", | ||
"start_date": "2020-05-01T00:00:00Z" | ||
} | ||
|
||
def with_account_id(self, account_id: str) -> "ConfigBuilder": | ||
self._config["account_id"] = account_id | ||
return self | ||
|
||
def with_client_secret(self, client_secret: str) -> "ConfigBuilder": | ||
self._config["client_secret"] = client_secret | ||
return self | ||
|
||
def with_start_date(self, start_datetime: datetime) -> "ConfigBuilder": | ||
self._config["start_date"] = start_datetime.isoformat()[:-13]+"Z" | ||
return self | ||
|
||
def with_lookback_window_in_days(self, number_of_days: int) -> "ConfigBuilder": | ||
self._config["lookback_window_days"] = number_of_days | ||
return self | ||
|
||
def with_slice_range_in_days(self, number_of_days: int) -> "ConfigBuilder": | ||
self._config["slice_range"] = number_of_days | ||
return self | ||
|
||
def build(self) -> Dict[str, Any]: | ||
return self._config |
9 changes: 9 additions & 0 deletions
9
airbyte-integrations/connectors/source-stripe/unit_tests/integration/pagination.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,9 @@ | ||
from typing import Any, Dict | ||
|
||
from airbyte_cdk.test.mock_http.response_builder import PaginationStrategy | ||
|
||
|
||
class StripePaginationStrategy(PaginationStrategy): | ||
@staticmethod | ||
def update(response: Dict[str, Any]) -> None: | ||
response["has_more"] = True |
Oops, something went wrong.