Move deprecation warnings into test fixture

@cpennington if you please