web/test/unittest_webconfig.py
branchtls-sprint
changeset 1802 d628defebc17
parent 16 a70ece4d9d1a
child 1977 606923dff11b
equal deleted inserted replaced
1801:672acc730ce5 1802:d628defebc17
     8 class WebconfigTC(TestCase):
     8 class WebconfigTC(TestCase):
     9     def setUp(self):
     9     def setUp(self):
    10         self.config = ApptestConfiguration('data')
    10         self.config = ApptestConfiguration('data')
    11         self.config._cubes = ['file']
    11         self.config._cubes = ['file']
    12         self.config.load_configuration()
    12         self.config.load_configuration()
    13         
    13 
    14     def test_nonregr_print_css_as_list(self):
    14     def test_nonregr_print_css_as_list(self):
    15         """make sure PRINT_CSS *must* is a list"""
    15         """make sure PRINT_CSS *must* is a list"""
    16         config = self.config
    16         config = self.config
    17         req = FakeRequest()
    17         req = FakeRequest()
    18         print_css = req.external_resource('STYLESHEETS_PRINT')
    18         print_css = req.external_resource('STYLESHEETS_PRINT')
    24         self.failUnless('FILE_ICON' in self.config.ext_resources)
    24         self.failUnless('FILE_ICON' in self.config.ext_resources)
    25         rname = self.config.ext_resources['FILE_ICON'].replace('DATADIR/', '')
    25         rname = self.config.ext_resources['FILE_ICON'].replace('DATADIR/', '')
    26         self.failUnless('file' in self.config.locate_resource(rname).split(os.sep))
    26         self.failUnless('file' in self.config.locate_resource(rname).split(os.sep))
    27         cubicwebcsspath = self.config.locate_resource('cubicweb.css').split(os.sep)
    27         cubicwebcsspath = self.config.locate_resource('cubicweb.css').split(os.sep)
    28         self.failUnless('web' in cubicwebcsspath or 'shared' in cubicwebcsspath) # 'shared' if tests under apycot
    28         self.failUnless('web' in cubicwebcsspath or 'shared' in cubicwebcsspath) # 'shared' if tests under apycot
    29         
    29 
    30 if __name__ == '__main__':
    30 if __name__ == '__main__':
    31     unittest_main()
    31     unittest_main()
    32 
    32 
    33     
    33