1
0
mirror of synced 2025-12-20 18:39:31 -05:00
Files
airbyte/airbyte-integrations/connectors/source-asana/unit_tests/conftest.py
Cole Snodgrass 2e099acc52 update headers from 2022 -> 2023 (#22594)
* It's 2023!

* 2022 -> 2023

---------

Co-authored-by: evantahler <evan@airbyte.io>
2023-02-08 13:01:16 -08:00

31 lines
725 B
Python

#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from pytest import fixture
@fixture(name="config")
def config_fixture():
return {"credentials": {"personal_access_token": "TOKEN"}}
@fixture(name="mock_response")
def mock_response():
return {
"data": [{"gid": "gid", "resource_type": "resource_type", "name": "name"}],
"next_page": {"offset": "offset", "path": "path", "uri": "uri"},
}
@fixture(name="mock_stream")
def mock_stream_fixture(requests_mock):
def _mock_stream(path, response=None):
if response is None:
response = {}
url = f"https://app.asana.com/api/1.0/{path}"
requests_mock.get(url, json=response)
return _mock_stream