1
0
mirror of synced 2026-01-01 09:02:59 -05:00
Files
airbyte/airbyte-cdk/python/unit_tests/sources/declarative/interpolation/test_macros.py
Alexandre Girard 01fc7a48c7 move jinja macros to their own file (#14515)
* move jinja macros to their own file

* format

* export as dict

* format
2022-07-08 07:56:06 -07:00

25 lines
679 B
Python

#
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
import pytest
from airbyte_cdk.sources.declarative.interpolation.macros import macros
@pytest.mark.parametrize(
"test_name, fn_name, found_in_macros",
[
("test_now_local", "now_local", True),
("test_now_utc", "now_utc", True),
("test_today_utc", "today_utc", True),
("test_max", "max", True),
("test_day_delta", "day_delta", True),
("test_not_a_macro", "thisisnotavalidmacro", False),
],
)
def test_macros_export(test_name, fn_name, found_in_macros):
if found_in_macros:
assert fn_name in macros
else:
assert fn_name not in macros