Fix DEPRECATED warning in tests after Mojo v4.50