refactor TemplateInheritanceTest

The test was very ugly and unreadable, so I made it a bit less ugly.

I think it's important to have readable tests as they're source of knowledge, both for the team and perhaps also for external people. Maybe I'm biased, but I think of the tests as an extension to documentation, so IMO they should not just work, but be nicely written too ;)