This commit is contained in:
2025-04-13 01:11:44 -03:00
parent bef51f492a
commit 273c580139
20 changed files with 552 additions and 29 deletions

View File

@@ -76,6 +76,7 @@ def test_keypair():
assert KeyPair('123', 'abc').expr_attr_values() == {':pk': '123', ':sk': 'abc'}
assert KeyPair.parse_obj({'id': '123', 'sk': 'abc'}) == {'id': '123', 'sk': 'abc'}
assert KeyPair.parse_obj({'sk': 'abc', 'id': '123'}) == {'id': '123', 'sk': 'abc'}
assert KeyPair.parse_obj(['123', 'abc']) == {'id': '123', 'sk': 'abc'}
assert KeyPair.parse_obj([]) is None
@@ -103,7 +104,7 @@ def test_transact_write_items(
transact.put(
item=KeyPair(
'5OxmMjL-ujoR5IMGegQz',
ComposeKey('sergio@somosbeta.com.br', prefix='emails'),
ComposeKey('sergio@somosbeta.com.br', 'emails'),
),
cond_expr='attribute_not_exists(sk)',
)