Ejemplo n.º 1
0
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")
Ejemplo n.º 2
0
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")
Ejemplo n.º 3
0
 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"))
Ejemplo n.º 4
0
 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"))