Beispiel #1
0
def test_gsi2():
    visit = Visit(visitor_id, visit_date, user_number, page_title, page_slug,
                  session_start, scroll_events)
    assert visit.gsi2() == {
        'GSI2PK': {
            'S': f'SESSION#{ visitor_id }#{ session_start }'
        },
        'GSI2SK': {
            'S': f'VISIT#{ visit_date }'
        }
    }
Beispiel #2
0
def test_gsi2():
    visit = Visit('2020-12-23T20:32:26.000Z', '0.0.0.0', '0', 'Tyler Norlund',
                  '/', '2020-12-23T20:32:26.000Z')
    assert visit.gsi2() == {
        'GSI2PK': {
            'S': 'SESSION#0.0.0.0#2020-12-23T20:32:26.000Z'
        },
        'GSI2SK': {
            'S': 'VISIT#2020-12-23T20:32:26.000Z'
        }
    }