def METHOD_NAME(self, region, error):
    @configure_aws_region()
    def _decorated_func(region):
        pass
    if error:
        with pytest.raises(BadRequestException) as e:
            _decorated_func(region=region)
        assert_that(str(e.value.content)).contains(error)
    else:
        _decorated_func(region=region)
        assert_that(os.environ["AWS_DEFAULT_REGION"]).is_equal_to(region)