put class on parent scope
This commit is contained in:
@@ -477,6 +477,15 @@ class DynamoDBPersistenceLayer:
|
||||
return True
|
||||
|
||||
|
||||
class MissingError(ValueError):
|
||||
pass
|
||||
|
||||
|
||||
class PaginatedResult(TypedDict):
|
||||
items: list[dict]
|
||||
last_key: str | None
|
||||
|
||||
|
||||
class DynamoDBCollection:
|
||||
"""
|
||||
Example
|
||||
@@ -508,13 +517,6 @@ class DynamoDBCollection:
|
||||
)
|
||||
"""
|
||||
|
||||
class MissingError(ValueError):
|
||||
pass
|
||||
|
||||
class PaginatedResult(TypedDict):
|
||||
items: list[dict]
|
||||
last_key: str | None
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
persistence_layer: DynamoDBPersistenceLayer,
|
||||
|
||||
@@ -10,6 +10,7 @@ from layercake.dynamodb import (
|
||||
DynamoDBCollection,
|
||||
DynamoDBPersistenceLayer,
|
||||
KeyPair,
|
||||
MissingError,
|
||||
PartitionKey,
|
||||
TransactItems,
|
||||
serialize,
|
||||
@@ -103,7 +104,7 @@ def test_collection_get_item(
|
||||
'update_date': '2023-11-09T12:13:04.308986-03:00',
|
||||
}
|
||||
|
||||
with pytest.raises(DynamoDBCollection.MissingError):
|
||||
with pytest.raises(MissingError):
|
||||
collect.get_item(key=KeyPair('5OxmMjL-ujoR5IMGegQz', 'notfound'))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user