server/test/unittest_msplanner.py
branch3.5
changeset 3240 8604a15995d1
parent 3239 1ceac4cd4fb7
child 3293 69c0ba095536
child 3587 5b3725f315fc
equal deleted inserted replaced
3239:1ceac4cd4fb7 3240:8604a15995d1
   346 
   346 
   347 class MSPlannerTC(BaseMSPlannerTC):
   347 class MSPlannerTC(BaseMSPlannerTC):
   348 
   348 
   349     def setUp(self):
   349     def setUp(self):
   350         BaseMSPlannerTC.setUp(self)
   350         BaseMSPlannerTC.setUp(self)
   351         self.planner = MSPlanner(self.o.schema, self.o._rqlhelper)
   351         self.planner = MSPlanner(self.o.schema, self.repo.vreg.rqlhelper)
   352 
   352 
   353     _test = test_plan
   353     _test = test_plan
   354 
   354 
   355     def test_simple_system_only(self):
   355     def test_simple_system_only(self):
   356         """retrieve entities only supported by the system source
   356         """retrieve entities only supported by the system source
  1987 
  1987 
  1988     def setUp(self):
  1988     def setUp(self):
  1989         self.setup()
  1989         self.setup()
  1990         self.add_source(FakeCardSource, 'cards')
  1990         self.add_source(FakeCardSource, 'cards')
  1991         self.add_source(FakeCardSource, 'cards2')
  1991         self.add_source(FakeCardSource, 'cards2')
  1992         self.planner = MSPlanner(self.o.schema, self.o._rqlhelper)
  1992         self.planner = MSPlanner(self.o.schema, self.repo.vreg.rqlhelper)
  1993         assert repo.sources_by_uri['cards2'].support_relation('multisource_crossed_rel')
  1993         assert repo.sources_by_uri['cards2'].support_relation('multisource_crossed_rel')
  1994         assert 'multisource_crossed_rel' in repo.sources_by_uri['cards2'].cross_relations
  1994         assert 'multisource_crossed_rel' in repo.sources_by_uri['cards2'].cross_relations
  1995         assert repo.sources_by_uri['cards'].support_relation('multisource_crossed_rel')
  1995         assert repo.sources_by_uri['cards'].support_relation('multisource_crossed_rel')
  1996         assert 'multisource_crossed_rel' in repo.sources_by_uri['cards'].cross_relations
  1996         assert 'multisource_crossed_rel' in repo.sources_by_uri['cards'].cross_relations
  1997     _test = test_plan
  1997     _test = test_plan
  2140     repo = repo
  2140     repo = repo
  2141 
  2141 
  2142     def setUp(self):
  2142     def setUp(self):
  2143         self.setup()
  2143         self.setup()
  2144         self.add_source(FakeVCSSource, 'vcs')
  2144         self.add_source(FakeVCSSource, 'vcs')
  2145         self.planner = MSPlanner(self.o.schema, self.o._rqlhelper)
  2145         self.planner = MSPlanner(self.o.schema, self.repo.vreg.rqlhelper)
  2146     _test = test_plan
  2146     _test = test_plan
  2147 
  2147 
  2148     def test_multisource_inlined_rel_skipped(self):
  2148     def test_multisource_inlined_rel_skipped(self):
  2149         self._test('Any MAX(VC) '
  2149         self._test('Any MAX(VC) '
  2150                    'WHERE VC multisource_inlined_rel R2, R para %(branch)s, VC in_state S, S name "published", '
  2150                    'WHERE VC multisource_inlined_rel R2, R para %(branch)s, VC in_state S, S name "published", '