Esempio 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")
Esempio 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")
Esempio 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"))
Esempio 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"))