def test_extend(): """ Test LDAPValueList's extend method. """ lvl = LDAPValueList(("test1",)) lvl.extend(("test2", "test3")) assert lvl == ["test1", "test2", "test3"] with pytest.raises(ValueError): lvl.extend(("test4", "test1"))
def test_extend(): """ Test LDAPValueList's extend method. """ lvl = LDAPValueList(("test1", )) lvl.extend(("test2", "test3")) assert lvl == ["test1", "test2", "test3"] with pytest.raises(ValueError): lvl.extend(("test4", "test1"))
def test_extend(self): """ Test LDAPValueList's extend method. """ lvl = LDAPValueList(("test1",)) lvl.extend(("test2", "test3")) self.assertEqual(lvl, ["test1", "test2", "test3"]) self.assertRaises(ValueError, lambda: lvl.extend(("test4", "test1")))
def test_extend(self): """ Test LDAPValueList's extend method. """ lvl = LDAPValueList(("test1", )) lvl.extend(("test2", "test3")) self.assertEqual(lvl, ["test1", "test2", "test3"]) self.assertRaises(ValueError, lambda: lvl.extend(("test4", "test1")))