Make tests pass without deprecation warnings