[test] Use existing reference to repo_source
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 10 Mar 2017 18:18:51 +0100
changeset 12045 d19f7ec36d33
parent 12044 70bb46dfa87b
child 12046 9056a41d91ba
[test] Use existing reference to repo_source
cubicweb/server/test/unittest_ldapsource.py
--- a/cubicweb/server/test/unittest_ldapsource.py	Fri Mar 10 18:04:25 2017 +0100
+++ b/cubicweb/server/test/unittest_ldapsource.py	Fri Mar 10 18:18:51 2017 +0100
@@ -329,10 +329,10 @@
         repo_source = self.repo.sources_by_uri['ldap']
         with self.admin_access.repo_cnx() as cnx:
             source = cnx.execute('CWSource S WHERE S type="ldapfeed"').get_entity(0, 0)
-            config = source.repo_source.check_config(source)
+            config = repo_source.check_config(source)
             # filter with adim's phone number
             config['user-filter'] = u'(%s=%s)' % ('telephoneNumber', '109')
-            source.repo_source.update_config(source, config)
+            repo_source.update_config(source, config)
             cnx.commit()
         with self.repo.internal_cnx() as cnx:
             self.pull(cnx)
@@ -347,7 +347,7 @@
                              'activated')
             # unfilter, syt should be activated again
             config['user-filter'] = u''
-            source.repo_source.update_config(source, config)
+            repo_source.update_config(source, config)
             cnx.commit()
         with self.repo.internal_cnx() as cnx:
             self.pull(cnx)