replace deprecated unittest method