Ejemplo n.º 1
0
def test_append():
    """ Test LDAPValueList's append method. """
    lvl = LDAPValueList()
    lvl.append("test")
    assert "test" in lvl
    with pytest.raises(ValueError):
        lvl.append("Test")
Ejemplo n.º 2
0
def test_append():
    """ Test LDAPValueList's append method. """
    lvl = LDAPValueList()
    lvl.append("test")
    assert "test" in lvl
    with pytest.raises(ValueError):
        lvl.append("Test")
Ejemplo n.º 3
0
 def test_clear(self):
     """ Test setting LDAPValueList's clear method. """
     lvl = LDAPValueList((1,2,3))
     lvl.append(4)
     lvl.clear()
     self.assertEqual(lvl, [])
Ejemplo n.º 4
0
 def test_append(self):
     """ Test LDAPValueList's append method. """
     lvl = LDAPValueList()
     lvl.append("test")
     self.assertRaises(ValueError, lambda: lvl.append("Test"))
Ejemplo n.º 5
0
def test_clear():
    """ Test setting LDAPValueList's clear method. """
    lvl = LDAPValueList((1, 2, 3))
    lvl.append(4)
    lvl.clear()
    assert lvl == []
Ejemplo n.º 6
0
def test_clear():
    """ Test setting LDAPValueList's clear method. """
    lvl = LDAPValueList((1, 2, 3))
    lvl.append(4)
    lvl.clear()
    assert lvl == []
Ejemplo n.º 7
0
 def test_append(self):
     """ Test LDAPValueList's append method. """
     lvl = LDAPValueList()
     lvl.append("test")
     self.assertRaises(ValueError, lambda: lvl.append("Test"))
Ejemplo n.º 8
0
 def test_clear(self):
     """ Test setting LDAPValueList's clear method. """
     lvl = LDAPValueList((1, 2, 3))
     lvl.append(4)
     lvl.clear()
     self.assertEqual(lvl, [])