'Test using a cvxpy expression as an objective.'

def test_bad_objective(self):

    with self.assertRaises(Exception) as cm:
        Problem((self.x + 2))
    self.assertEqual(str(cm.exception), 'Problem    objective    must    be    Minimize    or    Maximize.')
