Add bounds-check assertions

Added some assertions to bounds-check returned lists on the
test_flavors tests

Change-Id: Ia3b7c7e5a864c0f448999a4cc304a578bdd6a1df
bugfix for networks variable

* assigned networks variable to None before reference

Change-Id: I0c0e54e41a7cf2bca531e2608078b67b6485c402
Merge "Add bounds-check assertions"
Merge "bugfix for networks variable"