def METHOD_NAME(self):
    res = self.res
    model = self.mod
    with pytest.raises(ValueError):
        # No "result" attribute
        model.predict_distribution(model.exog)
    try:
        model.result = res
        dist = model.predict_distribution(model.exog)
        assert isinstance(dist, stats._distn_infrastructure.rv_frozen)
        assert_almost_equal(dist.mean(),
                            np.exp(model.exog.dot(res.params)),
                            15)
    finally:
        # leave the model object how we found it
        model.__delattr__("result")