-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source Hubspot: fix
URI too long
issue (#13691)
* #268: fix URI too long (HubSpot) * #268 upd changelog * #268 oncall: review fix * auto-bump connector version Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
- Loading branch information
1 parent
6c8cae2
commit 5df20b7
Showing
6 changed files
with
30 additions
and
5 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
23 changes: 23 additions & 0 deletions
23
airbyte-integrations/connectors/source-hubspot/unit_tests/test_split_properties.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,23 @@ | ||
# | ||
# Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
import pytest | ||
from source_hubspot.streams import split_properties | ||
|
||
lorem_ipsum = """Lorem ipsum dolor sit amet, consectetur adipiscing elit""" | ||
lorem_ipsum = lorem_ipsum.lower().replace(",", "") | ||
|
||
many_properties = lorem_ipsum.split(" ") * 100 | ||
few_properties = ["firstname", "lastname", "age", "dob", "id"] | ||
|
||
|
||
@pytest.mark.parametrize(("properties", "chunks_expected"), ((few_properties, 1), (many_properties, 2))) | ||
def test_split_properties(properties, chunks_expected): | ||
chunked_properties = set() | ||
index = 0 | ||
for index, chunk in enumerate(split_properties(properties)): | ||
chunked_properties |= set(chunk) | ||
chunks = index + 1 | ||
assert chunked_properties == set(properties) | ||
assert chunks == chunks_expected |
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