remove prefix for partition key
This commit is contained in:
@@ -171,18 +171,33 @@ def test_collection_get_items(
|
||||
collect = DynamoDBCollection(dynamodb_persistence_layer)
|
||||
|
||||
# This data was added from seeds
|
||||
data = collect.get_items(
|
||||
logs = collect.get_items(
|
||||
PartitionKey(
|
||||
ComposeKey('5OxmMjL-ujoR5IMGegQz', prefix='logs'),
|
||||
),
|
||||
)
|
||||
assert len(data['items']) == 2
|
||||
assert len(logs['items']) == 2
|
||||
assert logs == {
|
||||
'items': [
|
||||
{
|
||||
'sk': '2024-02-08T16:42:33.776409-03:00',
|
||||
'action': 'OPEN_EMAIL',
|
||||
'id': '5OxmMjL-ujoR5IMGegQz',
|
||||
},
|
||||
{
|
||||
'sk': '2019-03-25T00:00:00-03:00',
|
||||
'action': 'CLICK_EMAIL',
|
||||
'id': '5OxmMjL-ujoR5IMGegQz',
|
||||
},
|
||||
],
|
||||
'last_key': None,
|
||||
}
|
||||
|
||||
# This data was added from seeds
|
||||
data = collect.get_items(
|
||||
emails = collect.get_items(
|
||||
KeyPair('5OxmMjL-ujoR5IMGegQz', PrefixKey('emails#')),
|
||||
)
|
||||
assert data == {
|
||||
assert emails == {
|
||||
'items': [
|
||||
{
|
||||
'email_verified': True,
|
||||
|
||||
Reference in New Issue
Block a user