From e7457239b3fcbce91aa53bf858ae77edc9db3dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Wed, 18 Oct 2023 21:34:26 -0600 Subject: [PATCH] fix: Update `user_history` field types (#196) --- tap_jotform/streams.py | 10 +++++++++- tests/conftest.py | 5 +++++ tests/test_core.py | 9 ++------- 3 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 tests/conftest.py diff --git a/tap_jotform/streams.py b/tap_jotform/streams.py index ea18bd9..fec7165 100644 --- a/tap_jotform/streams.py +++ b/tap_jotform/streams.py @@ -263,17 +263,25 @@ class UserHistory(JotformStream): allowed_values=[ "userCreation", "userLogin", + "userLogout", "formCreation", "formUpdate", "formDelete", "formPurge", + "lastUpdate", + "passwordChanged", + "portalCreated", + "portalUpdated", + "reportCreated", + "reportUpdated", + "submissionDeleteAll", ], ), th.Property("username", th.StringType), th.Property("ip", th.StringType), th.Property("server", th.StringType), th.Property("timestamp", th.IntegerType), - th.Property("email", th.EmailType), + th.Property("email", th.StringType), th.Property("parent", th.StringType), th.Property("subuser", th.StringType), ).to_dict() diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..e8ecb41 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,5 @@ +"""Pytest configuration for tests in this directory.""" + +from __future__ import annotations + +pytest_plugins = ("singer_sdk.testing.pytest_plugin",) diff --git a/tests/test_core.py b/tests/test_core.py index 91f444f..02974a9 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -4,15 +4,10 @@ from typing import Any -from singer_sdk.testing import get_standard_tap_tests +from singer_sdk.testing import get_tap_test_class from tap_jotform.tap import TapJotform SAMPLE_CONFIG: dict[str, Any] = {} - -def test_standard_tap_tests(): - """Run standard tap tests from the SDK.""" - tests = get_standard_tap_tests(TapJotform, config=SAMPLE_CONFIG) - for test in tests: - test() +TestTapJotform = get_tap_test_class(TapJotform, config=SAMPLE_CONFIG)