Tidy up the media tests

Better to do this once now than for every upstreaming patch.