Stop attr error in templates when testing