[test/web] add a test for css generation file permission problem (related to #17143773)
--- a/cubicweb/web/test/unittest_propertysheet.py Thu Apr 19 15:05:55 2018 +0200
+++ b/cubicweb/web/test/unittest_propertysheet.py Thu Apr 19 12:45:24 2018 +0200
@@ -58,6 +58,13 @@
os.utime(self.data('pouet.css'), None)
self.assertFalse(ps.need_reload())
+ def test_chmod(self):
+ ps = PropertySheet(self.cachedir, datadir_url='http://cwtest.com')
+ ps.load(self.data('sheet1.py'))
+ rdir = ps.process_resource(DATADIR, 'pouet.css')
+ mode = os.stat(join(rdir, 'pouet.css')).st_mode
+ self.assertEqual(('%o' % mode)[-4:], '0644')
+
if __name__ == '__main__':
main()