Switching string comp to dict/list comp in tests

To help avoid dict ordering errors...