Update the preview script to work

Add test to ensure it stays working.

Change-Id: I118d17ba91db223898306388ace24cd92a7baab2
Various linting fixes

Rename a couple of the tests to match their intent and remove a
name conflict at the same time.

Change-Id: Ida5e3b1899170e864a26e7a1c0951fcf9a872f29