--- a/server/test/unittest_ldapuser.py Mon Dec 17 14:26:41 2012 +0100
+++ b/server/test/unittest_ldapuser.py Mon Dec 17 14:40:03 2012 +0100
@@ -103,9 +103,9 @@
session.create_entity('CWSource', name=u'ldapuser', type=u'ldapfeed', parser=u'ldapfeed',
url=URL, config=CONFIG)
session.commit()
- isession = session.repo.internal_session(safe=True)
- lfsource = isession.repo.sources_by_uri['ldapuser']
- stats = lfsource.pull_data(isession, force=True, raise_on_error=True)
+ with session.repo.internal_session(safe=True) as isession:
+ lfsource = isession.repo.sources_by_uri['ldapuser']
+ stats = lfsource.pull_data(isession, force=True, raise_on_error=True)
def _pull(self):
with self.session.repo.internal_session() as isession: