def testReserveRedundant(self):
     available_vlans = self.available_vlans
     expected = (0, 2)
     actual = solution.Reserve(available_vlans, True)
 
     self.assertEqual(actual[0], expected[0])
     self.assertEqual(actual[1], expected[1])
 def testReserveNonRedundant(self):
     available_vlans = self.available_vlans
     expected = (3, 1)
     actual = solution.Reserve(available_vlans, False)
     
     self.assertEqual(actual[0], expected[0])
     self.assertEqual(actual[1], expected[1])
 def testUnavailableVlansRemovedForRedundant(self):
     available_vlans = self.available_vlans
     final_vlans = available_vlans[0:1] + available_vlans[2:]
     solution.Reserve(available_vlans, True)
     self.assertVlanNodeListEqual(available_vlans, final_vlans)
 def testUnavailableVlansRemovedForNonRedundant(self):
     available_vlans = self.available_vlans
     final_vlans = available_vlans[1:]
     solution.Reserve(available_vlans, False)
     self.assertVlanNodeListEqual(available_vlans, final_vlans)
 def testReserveRedundant_None(self):
     self.assertIsNone(solution.Reserve(self.available_vlans[3:], True))