Ejemplo n.º 1
0
def test_set_qstring_params_error(datadir):
    event = Event()
    with pytest.raises(AwAwsMissingRequirement, match='Event not set'):
        event.set_qstring_params()
Ejemplo n.º 2
0
def test_set_qstring_params_no_qsring(datadir):
    apigw_event = json.loads(open(datadir.join('apigw_event_4.json'), 'rt').read())
    event = Event()
    event.set_event(apigw_event)
    check = event.set_qstring_params()
    assert check is None
Ejemplo n.º 3
0
def test_set_qstring_params(datadir):
    apigw_event = json.loads(open(datadir.join('apigw_event.json'), 'rt').read())
    event = Event()
    event.set_event(apigw_event)
    event.set_qstring_params()
    assert event.params['foo'] == 'bar'