in api/conftest.py [0:0]
def mock_participant_table(mock_dynamodb):
WheelParticipant = mock_dynamodb.Table(PARTICIPANT_TABLE_NAME)
add_extended_table_functions(WheelParticipant)
utils.WheelParticipant = WheelParticipant
yield WheelParticipant
participants = WheelParticipant.scan()['Items']
with WheelParticipant.batch_writer() as batch:
for participant in participants:
batch.delete_item(Key={'id': participant['id'], 'wheel_id': participant['wheel_id']})