-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
šSource Harvest: āstarted_timeā being incorrectly cast as datetime fiā¦
ā¦eld (#15312) * Increased unit test coverage * Fixed schema format error * Updated PR number * Uncomment connection tests * Fixed typo * Fix request_params if stream_slice None * auto-bump connector version [ci skip] Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
- Loading branch information
1 parent
8d9a3aa
commit 43e7fbb
Showing
14 changed files
with
218 additions
and
101 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
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
3 changes: 3 additions & 0 deletions
3
airbyte-integrations/connectors/source-harvest/requirements.txt
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,3 @@ | ||
# This file is autogenerated -- only edit if you know what you are doing. Use setup.py for declaring dependencies. | ||
-e ../../bases/source-acceptance-test | ||
-e . |
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 |
---|---|---|
|
@@ -11,6 +11,8 @@ | |
|
||
TEST_REQUIREMENTS = [ | ||
"pytest~=6.1", | ||
"requests-mock", | ||
"source-acceptance-test", | ||
] | ||
|
||
setup( | ||
|
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
35 changes: 35 additions & 0 deletions
35
airbyte-integrations/connectors/source-harvest/unit_tests/conftest.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,35 @@ | ||
# | ||
# Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
from pendulum import parse | ||
from pytest import fixture | ||
|
||
|
||
@fixture(name="config") | ||
def config_fixture(requests_mock): | ||
url = "https://id.getharvest.com/api/v2/oauth2/token" | ||
requests_mock.get(url, json={}) | ||
|
||
config = {"account_id": "ID", "replication_start_date": "2021-01-01T21:20:07Z", "credentials": {"api_token": "TOKEN"}} | ||
|
||
return config | ||
|
||
|
||
@fixture(name="replication_start_date") | ||
def replication_start_date_fixture(config): | ||
return parse(config["replication_start_date"]) | ||
|
||
|
||
@fixture(name="from_date") | ||
def from_date_fixture(replication_start_date): | ||
return replication_start_date.date() | ||
|
||
|
||
@fixture(name="mock_stream") | ||
def mock_stream_fixture(requests_mock): | ||
def _mock_stream(path, response={}): | ||
url = f"https://api.harvestapp.com/v2/{path}" | ||
requests_mock.get(url, json=response) | ||
|
||
return _mock_stream |
Oops, something went wrong.