test_titles originated in nova-specs. The version in nova-specs has
received several improvements that would be worth bringing over. This
started when I was writing a spec and the test code wouldn't let me
add any additional sections on top of the required ones.
Here's a list of key differences in the new version:
* Instead of hard coding the list of required sections, dynamically
discover the sections by reading the template.
* Ensure all sections from the template are present, but allow
additional sections to be included.
* Include the code for ensuring lines are wrapped, but disable it for
now since it doesn't pass.
* Make sure the spec doesn't have \r in it.
* Make sure the spec doesn't have trailing whitespace.
Also include a one line spec change to remove trailing whitespace so
the tests pass.
Change-Id: I15576e46ab34bf95ec8e0fc8066baad78460ceef