Fix test deprecationwarning