From d497112e3c5cb5a092dc39af4630598fe8c3c82a Mon Sep 17 00:00:00 2001 From: maxi297 Date: Mon, 18 Dec 2023 11:19:23 -0500 Subject: [PATCH] Format --- .../unit_tests/integration/response_builder.py | 3 +++ .../integration/test_application_fees.py | 14 ++++++-------- .../unit_tests/resource/http/response/401.json | 8 ++++---- .../unit_tests/resource/http/response/429.json | 12 ++++++------ .../unit_tests/resource/http/response/500.json | 4 +++- 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/airbyte-integrations/connectors/source-stripe/unit_tests/integration/response_builder.py b/airbyte-integrations/connectors/source-stripe/unit_tests/integration/response_builder.py index 1722b11cf2a9..7495bffeb4a9 100644 --- a/airbyte-integrations/connectors/source-stripe/unit_tests/integration/response_builder.py +++ b/airbyte-integrations/connectors/source-stripe/unit_tests/integration/response_builder.py @@ -1,4 +1,7 @@ +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. + import json + from airbyte_cdk.test.mock_http import HttpResponse from airbyte_cdk.test.mock_http.response_builder import find_template diff --git a/airbyte-integrations/connectors/source-stripe/unit_tests/integration/test_application_fees.py b/airbyte-integrations/connectors/source-stripe/unit_tests/integration/test_application_fees.py index c1fc3f7d8f69..9ecf69351b92 100644 --- a/airbyte-integrations/connectors/source-stripe/unit_tests/integration/test_application_fees.py +++ b/airbyte-integrations/connectors/source-stripe/unit_tests/integration/test_application_fees.py @@ -1,16 +1,14 @@ -import json - -import freezegun +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +import json from datetime import datetime, timedelta, timezone from typing import Any, Dict, Optional from unittest import TestCase +import freezegun from airbyte_cdk.test.catalog_builder import CatalogBuilder -from airbyte_cdk.test.state_builder import StateBuilder -from airbyte_cdk.test.entrypoint_wrapper import read, EntrypointOutput +from airbyte_cdk.test.entrypoint_wrapper import EntrypointOutput, read from airbyte_cdk.test.mock_http import HttpMocker, HttpRequest, HttpResponse - from airbyte_cdk.test.mock_http.response_builder import ( FieldPath, HttpResponseBuilder, @@ -20,13 +18,13 @@ create_response_builder, find_template, ) +from airbyte_cdk.test.state_builder import StateBuilder from airbyte_protocol.models import ConfiguredAirbyteCatalog, FailureType, SyncMode -from source_stripe import SourceStripe from integration.config import ConfigBuilder from integration.pagination import StripePaginationStrategy from integration.request_builder import StripeRequestBuilder from integration.response_builder import a_response_with_status - +from source_stripe import SourceStripe _EVENT_TYPES = ["application_fee.created", "application_fee.refunded"] diff --git a/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/401.json b/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/401.json index ccb04899d339..67f5dfd22e07 100644 --- a/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/401.json +++ b/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/401.json @@ -1,6 +1,6 @@ { - "error": { - "message": "Invalid API Key provided: sk_test_*****************************************************mFeM", - "type": "invalid_request_error" - } + "error": { + "message": "Invalid API Key provided: sk_test_*****************************************************mFeM", + "type": "invalid_request_error" + } } diff --git a/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/429.json b/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/429.json index b11a9b60c262..249f882eecc0 100644 --- a/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/429.json +++ b/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/429.json @@ -1,8 +1,8 @@ { - "error": { - "message": "Request rate limit exceeded. Learn more about rate limits here https://stripe.com/docs/rate-limits.", - "type": "invalid_request_error", - "code": "rate_limit", - "doc_url": "https://stripe.com/docs/error-codes/rate-limit" - } + "error": { + "message": "Request rate limit exceeded. Learn more about rate limits here https://stripe.com/docs/rate-limits.", + "type": "invalid_request_error", + "code": "rate_limit", + "doc_url": "https://stripe.com/docs/error-codes/rate-limit" + } } diff --git a/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/500.json b/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/500.json index 9245abf4d526..0077e9a45a61 100644 --- a/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/500.json +++ b/airbyte-integrations/connectors/source-stripe/unit_tests/resource/http/response/500.json @@ -1 +1,3 @@ -{"unknown": "maxi297: I could not reproduce the issue hence this response will not look like the actual 500 status response"} +{ + "unknown": "maxi297: I could not reproduce the issue hence this response will not look like the actual 500 status response" +}