Move deprecation warnings into test fixture

@cpennington if you please
Is there any way to save the warning settings, so that you can set them back to whatever they were when this test ends?