Skip to content

Commit

Permalink
Test records with version
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jul 13, 2024
1 parent 8f390f6 commit a5f67a5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/_singerlib/test_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ def test_record_message_time_extracted_to_utc():
assert record.time_extracted == datetime.datetime(2021, 1, 1, 9, tzinfo=UTC)


def test_record_message_with_version():
record = singer.RecordMessage(
stream="test",
record={"id": 1, "name": "test"},
version=1614556800,
)
assert record.version == 1614556800
assert record.to_dict() == {
"type": "RECORD",
"stream": "test",
"record": {"id": 1, "name": "test"},
"version": 1614556800,
}


def test_schema_message():
schema = singer.SchemaMessage(
stream="test",
Expand Down

0 comments on commit a5f67a5

Please sign in to comment.