Fixed a PendingDeprecationWarning in template_tests.