def test_check_residual_autocorrelation_must_raise_exception_when_data_not_fitted(self, linearity_validator_obj):
    'Given data,\n        if no regression was calculated\n        Should raise an exception'
    linearity_validator_obj.fitted_result = None
    with pytest.raises(DataWasNotFitted):
        linearity_validator_obj.check_residual_autocorrelation()
Given data,
if no regression was calculated
Should raise an exception
def test_check_residual_autocorrelation_must_raise_exception_when_data_not_fitted(self, linearity_validator_obj):
    'Given data,\n        if no regression was calculated\n        Should raise an exception'
    linearity_validator_obj.fitted_result = None
    with pytest.raises(DataWasNotFitted):
        linearity_validator_obj.check_residual_autocorrelation()