def test_set_path_params_error(datadir): event = Event() with pytest.raises(AwAwsMissingRequirement, match='Event not set'): event.set_path_params()
def test_set_path_missing(datadir): apigw_event = json.loads(open(datadir.join('apigw_event_no_path.json'), 'rt').read()) event = Event() event.set_event(apigw_event) event.set_path_params() assert event.path is None
def test_set_path_params(datadir): apigw_event = json.loads(open(datadir.join('apigw_event.json'), 'rt').read()) event = Event() event.set_event(apigw_event) event.set_path_params() assert event.path == '/the/cool/path'