Skip to content

Commit a1b1cf2

Browse files
committed
Add UUID=>ULID test
1 parent 5e35fa9 commit a1b1cf2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_ulid.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class Something(BaseModel):
2727
# Invalid ULID for str format
2828
('01BTGNYV6HRNK8K8VKZASZCFP', None, False), # Invalid ULID (short length)
2929
('01BTGNYV6HRNK8K8VKZASZCFPEA', None, False), # Invalid ULID (long length)
30+
# Valid ULID for UUID format
31+
(uuid.UUID('0196FEB3-9C99-8D8C-B3F3-4301C5E9DCE1'), '01JVZB774SHP6B7WT3072YKQ71', True),
32+
(uuid.UUID('0196FEB3-CD14-4B50-0015-C1E09BF7B221'), '01JVZB7K8M9D8005E1W2DZFCH1', True),
3033
# Valid ULID for _ULID format
3134
(_ULID.from_str('01BTGNYV6HRNK8K8VKZASZCFPE'), '01BTGNYV6HRNK8K8VKZASZCFPE', True),
3235
(_ULID.from_str('01BTGNYV6HRNK8K8VKZASZCFPF'), '01BTGNYV6HRNK8K8VKZASZCFPF', True),

0 commit comments

Comments
 (0)