Fix broken tests in 2.7