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

Fix formatting for connectors base #20158

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from typing import Any, List, Mapping, Optional, Union

import requests
from airbyte_cdk.sources.declarative.requesters.paginators.strategies.pagination_strategy import PaginationStrategy
from airbyte_cdk.sources.declarative.interpolation import InterpolatedString
from airbyte_cdk.sources.declarative.requesters.paginators.strategies.pagination_strategy import PaginationStrategy
from airbyte_cdk.sources.declarative.types import Config
from dataclasses_jsonschema import JsonSchemaMixin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import pytest
import requests

from airbyte_cdk.sources.declarative.interpolation import InterpolatedString
from airbyte_cdk.sources.declarative.requesters.paginators.strategies.offset_increment import OffsetIncrement

Expand Down Expand Up @@ -40,10 +39,8 @@ def test_offset_increment_paginator_strategy(test_name, page_size, expected_next

def test_offset_increment_paginator_strategy_rises():
paginator_strategy = OffsetIncrement(
page_size=InterpolatedString(string="{{ options['page_size'] }}", options={"page_size": "invalid value"}),
options={},
config={}
page_size=InterpolatedString(string="{{ options['page_size'] }}", options={"page_size": "invalid value"}), options={}, config={}
)
with pytest.raises(Exception) as exc:
paginator_strategy.get_page_size()
assert str(exc.value) == 'invalid value is of type <class \'str\'>. Expected <class \'int\'>'
assert str(exc.value) == "invalid value is of type <class 'str'>. Expected <class 'int'>"