예제 #1
0
def _CreateTestDataSource(base_dir):
    '''TemplateDataSource is not instantiated directly, rather, its methods
  are invoked through a subclass of it, which has as its only data the
  directory in which TemplateDataSource methods should act on. Thus, we test
  TemplateDataSource indirectly through the TestDataSource class
  '''
    return TestDataSource(
        ServerInstance.ForLocal(),
        '%stest_data/template_data_source/%s/' % (SERVER2, base_dir))
예제 #2
0
 def CreateServerInstance(self):
     return ServerInstance.ForLocal()
예제 #3
0
 def setUp(self):
   self._template_renderer = ServerInstance.ForLocal().template_renderer
예제 #4
0
 def CreateServerInstanceForChannel(self, channel):
     return ServerInstance.ForLocal()
예제 #5
0
 def setUp(self):
   self._server_instance = ServerInstance.ForLocal()
 def _CreateTemplateDataSource(self, partial_dir):
     return TemplateDataSource(
         ServerInstance.ForLocal(),
         None,  # Request
         partial_dir='%s/test_data/template_data_source/%s' %
         (SERVER2, partial_dir))