def test_set_qstring_params_error(datadir): event = Event() with pytest.raises(AwAwsMissingRequirement, match='Event not set'): event.set_qstring_params()
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
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'