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 print_css = config.uiprops['STYLESHEETS_PRINT'] |
36 print_css = config.uiprops['STYLESHEETS_PRINT'] |
37 self.failUnless(isinstance(print_css, list)) |
37 self.assertTrue(isinstance(print_css, list)) |
38 ie_css = config.uiprops['STYLESHEETS_IE'] |
38 ie_css = config.uiprops['STYLESHEETS_IE'] |
39 self.failUnless(isinstance(ie_css, list)) |
39 self.assertTrue(isinstance(ie_css, list)) |
40 |
40 |
41 def test_locate_resource(self): |
41 def test_locate_resource(self): |
42 self.failUnless('FILE_ICON' in self.config.uiprops) |
42 self.assertTrue('FILE_ICON' in self.config.uiprops) |
43 rname = self.config.uiprops['FILE_ICON'].replace(self.config.datadir_url, '') |
43 rname = self.config.uiprops['FILE_ICON'].replace(self.config.datadir_url, '') |
44 self.failUnless('file' in self.config.locate_resource(rname)[0].split(os.sep)) |
44 self.assertTrue('file' in self.config.locate_resource(rname)[0].split(os.sep)) |
45 cubicwebcsspath = self.config.locate_resource('cubicweb.css')[0].split(os.sep) |
45 cubicwebcsspath = self.config.locate_resource('cubicweb.css')[0].split(os.sep) |
46 self.failUnless('web' in cubicwebcsspath or 'shared' in cubicwebcsspath) # 'shared' if tests under apycot |
46 self.assertTrue('web' in cubicwebcsspath or 'shared' in cubicwebcsspath) # 'shared' if tests under apycot |
47 |
47 |
48 if __name__ == '__main__': |
48 if __name__ == '__main__': |
49 unittest_main() |
49 unittest_main() |
50 |
50 |
51 |
51 |