def setUp(self): loader.load() from finsignia.gae import controllers class TestController(controllers.ApplicationController): def template_path(self): return os.path.join(os.path.dirname(__file__), 'templates') self.controller = TestController()
def setUp(self): loader.load() from finsignia.gae import router from finsignia.gae import controllers self._routeMapper = router.RouteMapper() self._testController = controllers.ApplicationController() pass
def testUnload(self): loader.load() loaded_paths = sys.path loaded_size = len(loaded_paths) loader.unload() unloaded_paths = sys.path unloaded_size = len(unloaded_paths) self.assertNotEqual(loaded_size, unloaded_paths) self.assertTrue(loaded_size > unloaded_size) self.assertEqual(loaded_size, unloaded_size + 4)
def testLoad(self): loader.unload() original_paths = sys.path original_size = len(original_paths) loader.load() loaded_paths = sys.path loaded_size = len(loaded_paths) self.assertNotEqual(original_size, loaded_size) self.assertTrue(loaded_size > original_size) self.assertEqual(loaded_size, original_size + 4)
def setUp(self): loader.load() self._modelClass = object() self._templateMappings = {} self._objectFields = [] from finsignia.gae import controllers class TestController(controllers.ResourceController): def modelClass(self): return self._modelClass def templateMappings(self): return self._templateMappings def objectFields(self): return self._objectFields self._testController = TestController()