def test_get_next_available_tag(self): """Test get next available tags returns different tags""" link = Link(self.iface1, self.iface2) tag = link.get_next_available_tag() next_tag = link.get_next_available_tag() self.assertNotEqual(tag, next_tag)
def test_get_tag_multiple_calls(self): """Test get next available tags returns different tags""" link = Link(self.iface1, self.iface2) tag = link.get_next_available_tag() self.assertEqual(tag.value, 1) next_tag = link.get_next_available_tag() self.assertEqual(next_tag.value, 2)
def test_next_tag_with_use_tags(self): """Test get next availabe tags returns different tags""" link = Link(self.iface1, self.iface2) tag = link.get_next_available_tag() is_available = link.is_tag_available(tag) self.assertFalse(is_available) link.use_tag(tag)
def test_tag_life_cicle(self): """Test get next available tags returns different tags""" link = Link(self.iface1, self.iface2) tag = link.get_next_available_tag() is_available = link.is_tag_available(tag) self.assertFalse(is_available) link.make_tag_available(tag) is_available = link.is_tag_available(tag) self.assertTrue(is_available)