'Test creating a less than or equal constraint.'

def test_leq_constr(self):

    size = (5, 5)
    x = create_var(size)
    y = create_var(size)
    lh_expr = sum_expr([x, y])
    value = np.ones(size)
    rh_expr = create_const(value, size)
    constr = create_leq(lh_expr, rh_expr)
    self.assertEqual(constr.size, size)
    vars_ = get_expr_vars(constr.expr)
    ref = [(x.data, size), (y.data, size)]
    if PY2:
        self.assertItemsEqual(vars_, ref)
    else:
        self.assertCountEqual(vars_, ref)
