Use @override_settings decorator in template test

As discussed in #2425, this is the preferred approach.