Changeset 5580
- Timestamp:
- 10/22/08 13:43:45 (3 months ago)
- Files:
-
- trunk/tg/tests/test_stack/lib (copied) (copied from trunk/tg/lib)
- trunk/tg/tests/test_stack/lib/base.py (moved) (moved from trunk/tg/lib/base.py)
- trunk/tg/tests/test_stack/lib/helpers.py (moved) (moved from trunk/tg/lib/helpers.py)
- trunk/tg/tests/test_stack/lib/__init__.py (moved) (moved from trunk/tg/lib/__init__.py)
- trunk/tg/tests/test_stack/lib/lib (moved) (moved from trunk/tg/lib)
- trunk/tg/tests/test_stack/test_config.py (modified) (2 diffs)
- trunk/tg/wsgiapp.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tg/tests/test_stack/test_config.py
r5578 r5580 11 11 self.renderers = ['genshi'] 12 12 self.render_functions = tg.util.Bunch() 13 self.package = tg 13 self.package = tg.tests.test_stack 14 14 self.default_renderer = 'genshi' 15 15 self.globals = self … … 22 22 23 23 root = "." 24 test_base_path = os.path.join(root,'tg', 'tests', 25 'test_stack', 'config') 26 27 self.paths=tg.util.Bunch(root=test_base_path, 28 controllers=os.path.join(test_base_path, 'controllers'), 29 static_files=os.path.join(test_base_path, 'public'), 30 templates=[os.path.join(test_base_path, 'config_templates')] 24 test_base_path = os.path.join(root,'tg', 'tests', 'test_stack',) 25 test_config_path = os.path.join(test_base_path, 'config') 26 print test_config_path 27 self.paths=tg.util.Bunch( 28 root=test_base_path, 29 controllers=os.path.join(test_config_path, 'controllers'), 30 static_files=os.path.join(test_config_path, 'public'), 31 templates=[os.path.join(test_config_path, 'templates')] 31 32 ) 32 33 trunk/tg/wsgiapp.py
r5541 r5580 21 21 22 22 root_module_path = self.config['paths']['root'] 23 controller_path = self.config['paths']['controllers']23 base_controller_path = self.config['paths']['controllers'] 24 24 25 25 #remove the part of the path we expect to be the root part (plus one '/') 26 assert controller_path.startswith(root_module_path)27 controller_path = controller_path[len(root_module_path)+1:]26 assert base_controller_path.startswith(root_module_path) 27 controller_path = base_controller_path[len(root_module_path)+1:] 28 28 29 29 #attach the package … … 32 32 controller_path.replace('/', '.') + 33 33 '.' + controller.replace('/', '.')) 34 35 print full_module_name 34 36 35 37 if self.config.get('in_testing'):