Source Stripe: remove duplicate streams (#28709)
This commit is contained in:
@@ -13,5 +13,5 @@ ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
|
||||
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
|
||||
|
||||
|
||||
LABEL io.airbyte.version=3.14.0
|
||||
LABEL io.airbyte.version=3.15.0
|
||||
LABEL io.airbyte.name=airbyte/source-stripe
|
||||
|
||||
@@ -5,7 +5,7 @@ data:
|
||||
connectorSubtype: api
|
||||
connectorType: source
|
||||
definitionId: e094cb9a-26de-4645-8761-65c0c425d1de
|
||||
dockerImageTag: 3.14.0
|
||||
dockerImageTag: 3.15.0
|
||||
dockerRepository: airbyte/source-stripe
|
||||
githubIssueLabel: source-stripe
|
||||
icon: stripe.svg
|
||||
|
||||
@@ -113,11 +113,10 @@ class SourceStripe(AbstractSource):
|
||||
Products(**incremental_args),
|
||||
PromotionCodes(**incremental_args),
|
||||
Refunds(**incremental_args),
|
||||
SetupIntents(**incremental_args),
|
||||
ShippingRates(**incremental_args),
|
||||
Reviews(**incremental_args),
|
||||
SetupAttempts(**incremental_args),
|
||||
SetupIntents(**incremental_args),
|
||||
ShippingRates(**incremental_args),
|
||||
SubscriptionItems(**args),
|
||||
Subscriptions(**incremental_args),
|
||||
SubscriptionSchedule(**incremental_args),
|
||||
@@ -125,7 +124,5 @@ class SourceStripe(AbstractSource):
|
||||
Transactions(**incremental_args),
|
||||
TransferReversals(**args),
|
||||
Transfers(**incremental_args),
|
||||
ExternalAccountBankAccounts(**args),
|
||||
ExternalAccountCards(**args),
|
||||
UsageRecords(**args),
|
||||
]
|
||||
|
||||
@@ -42,7 +42,7 @@ def test_source_streams():
|
||||
with open("sample_files/config.json") as f:
|
||||
config = json.load(f)
|
||||
streams = SourceStripe().streams(config=config)
|
||||
assert len(streams) == 48
|
||||
assert len(streams) == 45
|
||||
|
||||
|
||||
@pytest.fixture(name="config")
|
||||
@@ -69,3 +69,9 @@ def test_source_check_connection_failure(mocked_client, config, logger_mock):
|
||||
mocked_client.Account.retrieve = Mock(side_effect=exception)
|
||||
assert SourceStripe().check_connection(
|
||||
logger_mock, config=config) == (False, exception)
|
||||
|
||||
|
||||
@patch.object(source_stripe.source, "stripe")
|
||||
def test_streams_are_unique(mocked_client, config):
|
||||
streams = [s.name for s in SourceStripe().streams(config)]
|
||||
assert sorted(streams) == sorted(set(streams))
|
||||
|
||||
Reference in New Issue
Block a user