Use assertIn to check for subnet membership

For dual stacked networks, the gateway port will have multiple subnets
associated

Change-Id: I450f896f29051921b011e1643f1a1e24ed82ac08
Merge "Use assertIn to check for subnet membership"