Update CLI test_medium tests

Update field lookup for operating systems.

Also improve formatting.
I'm happy to see single use variables disappear.