# HG changeset patch # User David Douard # Date 1524134724 -7200 # Node ID 547bb96ea2a8f01f8dacbafe9e18a0cde7ebdc49 # Parent 90ab73afe766087470f9d4c2c628d132c0d524db [test/web] add a test for css generation file permission problem (related to #17143773) diff -r 90ab73afe766 -r 547bb96ea2a8 cubicweb/web/test/unittest_propertysheet.py --- 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()