diff test/test_status.py @ 58:39b2deea8481

make the status files are world readable
author Bernhard Herzog <bh@intevation.de>
date Tue, 10 Apr 2007 17:42:46 +0200
parents 3c5ab7a65384
children b19bf5895a55
line wrap: on
line diff
--- a/test/test_status.py	Tue Apr 10 17:42:07 2007 +0200
+++ b/test/test_status.py	Tue Apr 10 17:42:46 2007 +0200
@@ -8,6 +8,7 @@
 """Tests for the Status classes"""
 
 import os
+import stat
 import unittest
 from datetime import datetime
 
@@ -35,6 +36,13 @@
         otherstatus = RevisionStatus(self.filename)
         self.assertEquals(otherstatus.status.name, "error")
 
+    def test_status_file_permissions(self):
+        status = RevisionStatus(self.filename)
+        status.error()
+
+        mode = os.stat(self.filename).st_mode
+        self.assertEquals(stat.S_IMODE(mode) & 0444, 0444)
+
     def test_getting_unknown_fields(self):
         status = RevisionStatus(self.filename)
         self.assertRaises(AttributeError, getattr, status, "unknown_field")
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)