add datetable cnfcnpj
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
from ipaddress import IPv4Address
|
||||
from uuid import UUID
|
||||
|
||||
import pytest
|
||||
from layercake.dateutils import ttl
|
||||
@@ -68,6 +69,22 @@ def test_serialize():
|
||||
}
|
||||
|
||||
|
||||
def test_serialize_uuid():
|
||||
uuid = UUID('12345678-1234-5678-1234-567812345678')
|
||||
assert serialize({'id': uuid}) == {
|
||||
'id': {'S': '12345678-1234-5678-1234-567812345678'}
|
||||
}
|
||||
|
||||
|
||||
def test_serialize_pairs():
|
||||
pairs = [(1, 2), (3, 4), (5, 6)]
|
||||
expected = serialize({'pairs': pairs})
|
||||
|
||||
assert expected == {
|
||||
'pairs': {'L': [{'NS': ['1', '2']}, {'NS': ['3', '4']}, {'NS': ['5', '6']}]}
|
||||
}
|
||||
|
||||
|
||||
def test_composekey():
|
||||
key = ComposeKey(('122', 'abc'), prefix='schedules', delimiter=':')
|
||||
assert key == 'schedules:122:abc'
|
||||
|
||||
Reference in New Issue
Block a user