[ Thread Index |
Date Index
| More opengp.tuxfamily.org/development Archives
]
Revision: 68
Author: alband85
Date: 2009-03-20 11:18:57 +0100 (Fri, 20 Mar 2009)
Log Message:
-----------
Bugfix
Modified Paths:
--------------
trunk/src/lib/ogp/core/ogpcore.py
trunk/src/tests/ogp-test.py
trunk/src/tests/text.py
Modified: trunk/src/lib/ogp/core/ogpcore.py
===================================================================
--- trunk/src/lib/ogp/core/ogpcore.py 2009-03-19 16:11:10 UTC (rev 67)
+++ trunk/src/lib/ogp/core/ogpcore.py 2009-03-20 10:18:57 UTC (rev 68)
@@ -220,8 +220,8 @@
self.l.delete_s(dn)
def __pullConf(self, dn):
- return fromstring(self.pullAttributes(dn,[OgpLDAPConsts.ATTR_CONFIG])[OgpLDAPConsts.ATTR_CONFIG], OGP_PARSER)
+ return fromstring(self.pullAttributes(dn,[OgpLDAPConsts.ATTR_CONFIG])[OgpLDAPConsts.ATTR_CONFIG][0], OGP_PARSER)
def __pullSOA(self, dn):
- return int(self.pullAttributes(dn, [OgpLDAPConsts.ATTR_OGPSOA])[OgpLDAPConsts.ATTR_OGPSOA])
+ return int(self.pullAttributes(dn, [OgpLDAPConsts.ATTR_OGPSOA])[OgpLDAPConsts.ATTR_OGPSOA][0])
Modified: trunk/src/tests/ogp-test.py
===================================================================
--- trunk/src/tests/ogp-test.py 2009-03-19 16:11:10 UTC (rev 67)
+++ trunk/src/tests/ogp-test.py 2009-03-20 10:18:57 UTC (rev 68)
@@ -5,7 +5,7 @@
from ogp.etree import *
uri = "ldap://localhost:389"
-dn = "cn=admin,dc=nodomain"
+dn = "cn=admin,dc=ogp"
passwd = "toor"
# Connection
@@ -23,9 +23,9 @@
toto = OgpCore.getInstance()
-#toto.createOU("ou=test,dc=nodomain")
-#print toto.pullPluginConf("ou=test2,ou=test,dc=nodomain", "test", True).toString()
-#conf = fromstring('<plugin name="test">test pushConf le retour</plugin>', OGP_PARSER)
-#toto.pushPluginConf("ou=test2,ou=test,dc=nodomain", conf)
-#toto.deleteDN("dc=nodomain")
-print toto.pushDescription("ou=test,dc=nodomain", "test")
+#toto.createOU("ou=test,dc=ogp")
+conf = fromstring('<plugin name="test">test pushConf le retour</plugin>', OGP_PARSER)
+toto.pushPluginConf("ou=test,dc=ogp", conf)
+#toto.deleteDN("ou=test,dc=ogp")
+print toto.pushDescription("ou=test,dc=ogp", "test")
+print toto.pullPluginConf("ou=test,dc=ogp", "test", True).toString()
Modified: trunk/src/tests/text.py
===================================================================
--- trunk/src/tests/text.py 2009-03-19 16:11:10 UTC (rev 67)
+++ trunk/src/tests/text.py 2009-03-20 10:18:57 UTC (rev 68)
@@ -1,6 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*
-from DomElementMethods import *
+from ogp.etree import *
obj = Element("AAA")
obj.text = "pouet"