예제 #1
0
 def test_remove(self):
     group = NetworkGroup()
     group.add(self.address01)
     assert_false(group.remove(self.address02))
     group.add(self.address02)
     assert_true(group.remove(self.address01))
     assert_true(group.remove(self.address02))
     assert_false(group.remove(self.address01))
     assert_false(group.has(self.address01))
     assert_false(group.has(self.address02))
예제 #2
0
 def test_address_is_default(self):
     group = NetworkGroup()
     assert_true(group.address_is_default)
     group.add(self.address01)
     assert_false(group.address_is_default)
     group.add(self.address02)
     group.remove(self.address01)
     assert_false(group.address_is_default)
     group.remove(self.address02)
     assert_true(group.address_is_default)