def test_invalid_case_outputs(self):
        model = Assembly()

        model.add('driver', DistributionCaseDriver())
        model.add('driven', SimpleComponent())
        model.driver.workflow.add('driven')
        model.driver.distribution_generator = FiniteDifferenceGenerator(model.driver)
        try:
            model.driver.add_response('driven.invalid')
        except __HOLE__ as err:
            self.assertEqual(str(err), "driver: Can't add response "
                             "'driven.invalid' because of invalid variables"
                             " 'driven.invalid'")
        else:
            self.fail('Expected ValueError')
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/drivers/test/test_distributioncasedriver.py/TestCase.test_invalid_case_outputs