Skip to content

Commit

Permalink
add converter unit test for postgresql enum
Browse files Browse the repository at this point in the history
  • Loading branch information
mjperrone committed Jan 18, 2024
1 parent 22fe4e5 commit e806095
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit/converters/test_postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from recap.types import (
BoolType,
BytesType,
EnumType,
FloatType,
IntType,
ListType,
Expand Down Expand Up @@ -239,6 +240,20 @@
scale=0,
),
),
(
{
'COLUMN_NAME': 'test_enum',
'DATA_TYPE': 'USER-DEFINED',
'CHARACTER_MAXIMUM_LENGTH': None,
'CHARACTER_OCTET_LENGTH': None,
'ENUM_VALUES': ['sad', 'ok', 'happy'],
'UDT_NAME': None,
'ATTNDIMS': 0,
},
EnumType(
symbols=['sad', 'ok', 'happy'],
),
)
],
)
def test_postgresql_converter(column_props, expected):
Expand Down

0 comments on commit e806095

Please sign in to comment.