Changeset 5580

Show
Ignore:
Timestamp:
10/22/08 13:43:45 (3 months ago)
Author:
mramm
Message:

cleaning up full-stack tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tg/tests/test_stack/test_config.py

    r5578 r5580  
    1111        self.renderers = ['genshi']  
    1212        self.render_functions = tg.util.Bunch() 
    13         self.package = tg 
     13        self.package = tg.tests.test_stack 
    1414        self.default_renderer = 'genshi' 
    1515        self.globals = self 
     
    2222         
    2323        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')] 
    3132                    ) 
    3233         
  • trunk/tg/wsgiapp.py

    r5541 r5580  
    2121 
    2222        root_module_path = self.config['paths']['root'] 
    23         controller_path = self.config['paths']['controllers'] 
     23        base_controller_path = self.config['paths']['controllers'] 
    2424 
    2525        #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:] 
    2828 
    2929        #attach the package 
     
    3232                            controller_path.replace('/', '.') + 
    3333                            '.' + controller.replace('/', '.')) 
     34                             
     35        print full_module_name 
    3436 
    3537        if self.config.get('in_testing'):