def testDelete(self): """ Try deleting an object via parent.delete(childname) """ attrs = py_test_object.copy() #This is tested above FIXME fully separate these two tests self.lmap.foo = lmap(attrs) self.lmap.foo._cached_children = {} del self.lmap.foo self.lmap.commit() self.ldap.delete.assert_called_with('ou=foo,'+BASE_DN)
def testDelete(self): """ Try deleting an object via parent.delete(childname) """ attrs = py_test_object.copy() #This is tested above FIXME fully separate these two tests self.lmap.foo = lmap(attrs) self.lmap.foo._cached_children = {} del self.lmap.foo self.lmap.commit() self.ldap.delete.assert_called_with('ou=foo,' + BASE_DN)
def setUp(self): #super(self, SlapdLmapTest).setUp(self) self.ldap = mock.Mock(spec=ldap) res = py_test_object.copy() self.ldap.search.return_value = [(res['dn'], res)] self.lmap = lmap(py_test_object.copy(), BASE_DN, self.ldap)
def testAdd(self): """ Add an object and see whether the data ends up in the database """ attrs = py_test_object self.lmap.foo = lmap(attrs) self.lmap.commit() self.ldap.add.assert_called_with('ou=foo,'+BASE_DN, attrs)
def testAdd(self): """ Add an object and see whether the data ends up in the database """ attrs = py_test_object self.lmap.foo = lmap(attrs) self.lmap.commit() self.ldap.add.assert_called_with('ou=foo,' + BASE_DN, attrs)