Skip to content

Commit

Permalink
DO NOT MERGE: Test fastjsonschema record validation
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Dec 5, 2023
1 parent 16e05f3 commit bebf0cf
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 18 deletions.
122 changes: 107 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ packages = [
[tool.poetry.dependencies]
python = "<3.12,>=3.8.1"
requests = "^2.25.1"
singer-sdk = ">=0.28,<0.34"
# singer-sdk = ">=0.28,<0.34"
singer-sdk = {git = "https://github.com/meltano/sdk.git", rev = "refs/pull/2066/head"}
psycopg2-binary = "2.9.9"
sqlalchemy = ">=2.0,<3.0"
sshtunnel = "0.4.0"
Expand Down
5 changes: 3 additions & 2 deletions target_postgres/tests/test_target_postgres.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Postgres target tests """

# flake8: noqa
import copy
import io
Expand All @@ -9,7 +10,7 @@
import jsonschema
import pytest
import sqlalchemy
from singer_sdk.exceptions import MissingKeyPropertiesError
from singer_sdk.exceptions import InvalidRecord, MissingKeyPropertiesError
from singer_sdk.testing import get_target_test_class, sync_end_to_end
from sqlalchemy.dialects.postgresql import ARRAY
from sqlalchemy.types import TEXT, TIMESTAMP
Expand Down Expand Up @@ -233,7 +234,7 @@ def test_record_missing_key_property(postgres_target):


def test_record_missing_required_property(postgres_target):
with pytest.raises(jsonschema.exceptions.ValidationError):
with pytest.raises(InvalidRecord):
file_name = "record_missing_required_property.singer"
singer_file_to_target(file_name, postgres_target)

Expand Down

0 comments on commit bebf0cf

Please sign in to comment.