31 self.config.load_configuration() |
31 self.config.load_configuration() |
32 |
32 |
33 def test_nonregr_print_css_as_list(self): |
33 def test_nonregr_print_css_as_list(self): |
34 """make sure PRINT_CSS *must* is a list""" |
34 """make sure PRINT_CSS *must* is a list""" |
35 config = self.config |
35 config = self.config |
36 req = fake.FakeRequest() |
36 print_css = config.uiprops['STYLESHEETS_PRINT'] |
37 print_css = req.external_resource('STYLESHEETS_PRINT') |
|
38 self.failUnless(isinstance(print_css, list)) |
37 self.failUnless(isinstance(print_css, list)) |
39 ie_css = req.external_resource('IE_STYLESHEETS') |
38 ie_css = config.uiprops['STYLESHEETS_IE'] |
40 self.failUnless(isinstance(ie_css, list)) |
39 self.failUnless(isinstance(ie_css, list)) |
41 |
40 |
42 def test_locate_resource(self): |
41 def test_locate_resource(self): |
43 self.failUnless('FILE_ICON' in self.config.ext_resources) |
42 self.failUnless('FILE_ICON' in self.config.uiprops) |
44 rname = self.config.ext_resources['FILE_ICON'].replace('DATADIR/', '') |
43 rname = self.config.uiprops['FILE_ICON'].replace(self.config.datadir_url, '') |
45 self.failUnless('file' in self.config.locate_resource(rname).split(os.sep)) |
44 self.failUnless('file' in self.config.locate_resource(rname)[0].split(os.sep)) |
46 cubicwebcsspath = self.config.locate_resource('cubicweb.css').split(os.sep) |
45 cubicwebcsspath = self.config.locate_resource('cubicweb.css')[0].split(os.sep) |
47 self.failUnless('web' in cubicwebcsspath or 'shared' in cubicwebcsspath) # 'shared' if tests under apycot |
46 self.failUnless('web' in cubicwebcsspath or 'shared' in cubicwebcsspath) # 'shared' if tests under apycot |
48 |
47 |
49 if __name__ == '__main__': |
48 if __name__ == '__main__': |
50 unittest_main() |
49 unittest_main() |
51 |
50 |