SqlServer: support single sign on / Windows credential authentication
This is done through a new db-extra-arguments section in instance_dir/sources
which is passed as a string to the extra_args named argument of
lgc.db.get_connection. If this argument is Trusted_Connection, windows
authentication is used instead of login/password.
This change requires at least revision 5475ec3f6412 of logilab.common which
will be included in logilab-common 0.46. debian/control updated to mention this
new dependency.
""":organization: Logilab:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses"""fromcubicweb.devtoolsimportinit_test_databasefromcubicweb.devtools.repotestimportBasePlannerTC,test_planfromcubicweb.server.ssplannerimportSSPlanner# keep cnx so it's not garbage collected and the associated session closedrepo,cnx=init_test_database('sqlite')classSSPlannerTC(BasePlannerTC):repo=repo_test=test_plandefsetUp(self):BasePlannerTC.setUp(self)self.planner=SSPlanner(self.o.schema,self.repo.vreg.rqlhelper)self.system=self.o._repo.system_sourcedeftearDown(self):BasePlannerTC.tearDown(self)deftest_ordered_ambigous_sol(self):self._test('Any XN ORDERBY XN WHERE X name XN, X is IN (Basket, State, Folder)',[('OneFetchStep',[('Any XN ORDERBY XN WHERE X name XN, X is IN(Basket, State, Folder)',[{'X':'Basket','XN':'String'},{'X':'State','XN':'String'},{'X':'Folder','XN':'String'}])],None,None,[self.system],None,[])])deftest_groupeded_ambigous_sol(self):self._test('Any XN,COUNT(X) GROUPBY XN WHERE X name XN, X is IN (Basket, State, Folder)',[('OneFetchStep',[('Any XN,COUNT(X) GROUPBY XN WHERE X name XN, X is IN(Basket, State, Folder)',[{'X':'Basket','XN':'String'},{'X':'State','XN':'String'},{'X':'Folder','XN':'String'}])],None,None,[self.system],None,[])])if__name__=='__main__':fromlogilab.common.testlibimportunittest_mainunittest_main()