[ms] fix two planner bugs: one occuring query such as X created_by U where X in a external source and U may come from an ldap source. The other being that when we've to merge input maps, we were modifying the same tree/solutions while a copy were needed. Also, ensure we add type restrictions, necessary for pyro source
fromlogilab.common.testlibimportTestCase,unittest_main,tagfromcubicweb.devtools.httptestimportCubicWebServerTCimporthttplibfromosimportpathasospclassTwistedCWAnonTC(CubicWebServerTC):deftest_response(self):try:response=self.web_get()excepthttplib.NotConnected,ex:self.fail("Can't connection to test server: %s"%ex)deftest_response_anon(self):response=self.web_get()self.assertEquals(response.status,httplib.OK)deftest_base_url(self):ifself.test_urlnotinself.web_get().read():self.fail('no mention of base url in retrieved page')classTwistedCWIdentTC(CubicWebServerTC):anonymous_logged=Falsedeftest_response_denied(self):response=self.web_get()self.assertEquals(response.status,httplib.FORBIDDEN)deftest_login(self):response=self.web_get()ifresponse.status!=httplib.FORBIDDEN:self.skip('Already authenticated')# loginself.web_login(self.admlogin,self.admpassword)response=self.web_get()self.assertEquals(response.status,httplib.OK)# logoutself.web_logout()response=self.web_get()self.assertEquals(response.status,httplib.FORBIDDEN)if__name__=='__main__':unittest_main()