def test_gsi2(): session = Session(session_start, visitor_id, avg_time, total_time) assert session.gsi2() == { 'GSI2PK': { 'S': f'SESSION#{ visitor_id }#{ session_start }' }, 'GSI2SK': { 'S': '#SESSION' } }
def test_gsi2(): session = Session(datetime.datetime(2020, 1, 1, 0, 0), '0.0.0.0', 0.1, 0.1) assert session.gsi2() == { 'GSI2PK': { 'S': 'SESSION#0.0.0.0#2020-01-01T00:00:00.000Z' }, 'GSI2SK': { 'S': '#SESSION' } }