fix enroll and reenroll relationship
This commit is contained in:
@@ -30,19 +30,19 @@ def test_reenroll(
|
||||
assert app.lambda_handler(event, lambda_context) # type: ignore
|
||||
|
||||
# Parent knows the child
|
||||
child_entity = dynamodb_persistence_layer.collection.get_item(
|
||||
current_entity = dynamodb_persistence_layer.collection.get_item(
|
||||
KeyPair(
|
||||
pk=parent_id,
|
||||
sk='LINKED_ENTITIES#ENROLLMENT#CHILD',
|
||||
)
|
||||
)
|
||||
assert child_entity
|
||||
assert current_entity
|
||||
|
||||
# Child knows the parent
|
||||
parent_entity = dynamodb_persistence_layer.collection.get_item(
|
||||
new_entity = dynamodb_persistence_layer.collection.get_item(
|
||||
KeyPair(
|
||||
pk=child_entity['enrollment_id'],
|
||||
pk=current_entity['enrollment_id'],
|
||||
sk='LINKED_ENTITIES#ENROLLMENT#PARENT',
|
||||
)
|
||||
)
|
||||
assert parent_entity['enrollment_id'] == parent_id
|
||||
assert new_entity['enrollment_id'] == parent_id
|
||||
|
||||
Reference in New Issue
Block a user