The 'warn' method is deprecated, use 'warning' instead.
Fix tests.