Exemplo n.º 1
0
	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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
	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)
Exemplo n.º 4
0
	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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 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)