def test_key(): session = Session(session_start, visitor_id, avg_time, total_time) assert session.key() == { 'PK': { 'S': f'VISITOR#{ visitor_id }' }, 'SK': { 'S': f'SESSION#{ session_start }' } }
def test_key(): session = Session(datetime.datetime(2020, 1, 1, 0, 0), '0.0.0.0', 0.1, 0.1) assert session.key() == { 'PK': { 'S': 'VISITOR#0.0.0.0' }, 'SK': { 'S': 'SESSION#2020-01-01T00:00:00.000Z' } }