def test_insert(): """ Test LDAPValueList's insert method. """ lvl = LDAPValueList(("test1",)) lvl.insert(0, "test2") assert lvl == ["test2", "test1"] with pytest.raises(ValueError): lvl.insert(2, "test2")
def test_insert(): """ Test LDAPValueList's insert method. """ lvl = LDAPValueList(("test1", )) lvl.insert(0, "test2") assert lvl == ["test2", "test1"] with pytest.raises(ValueError): lvl.insert(2, "test2")
def test_insert(self): """ Test LDAPValueList's insert method. """ lvl = LDAPValueList(("test1",)) lvl.insert(0, "test2") self.assertEqual(lvl, ["test2", "test1"]) self.assertRaises(ValueError, lambda: lvl.insert(2, "test2"))
def test_insert(self): """ Test LDAPValueList's insert method. """ lvl = LDAPValueList(("test1", )) lvl.insert(0, "test2") self.assertEqual(lvl, ["test2", "test1"]) self.assertRaises(ValueError, lambda: lvl.insert(2, "test2"))