equal
deleted
inserted
replaced
6 from cubicweb.devtools import ApptestConfiguration |
6 from cubicweb.devtools import ApptestConfiguration |
7 |
7 |
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 = ['efile'] |
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 |
21 self.failUnless(isinstance(ie_css, list)) |
21 self.failUnless(isinstance(ie_css, list)) |
22 |
22 |
23 def test_locate_resource(self): |
23 def test_locate_resource(self): |
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('efile' 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() |