Move deprecation setting into tests themselves