admin/test_flavors: some code cleanup and factorization

This patch uses list comprehension to avoid repeating the same code
lengthy pattern several times.

Change-Id: Ifc81349631b96fd9e91353aa798a02d7550db010
1 file changed