'Test a problem with diag.'

def test_diag_prob(self):

    C = Variable(3, 3)
    obj = Maximize(C[(0, 2)])
    constraints = [(diag(C) == 1), (C[(0, 1)] == 0.6), (C[(1, 2)] == (-0.3)), (C == Semidef(3))]
    prob = Problem(obj, constraints)
    result = prob.solve()
    self.assertAlmostEqual(result, 0.583151, places=2)
