diff test/test_status.py @ 59:9cb94b9ac6a6

merge
author Bernhard Herzog <bh@intevation.de>
date Tue, 10 Apr 2007 18:17:53 +0200
parents 39b2deea8481
children b19bf5895a55
line wrap: on
line diff
--- a/test/test_status.py	Tue Apr 10 12:20:47 2007 +0200
+++ b/test/test_status.py	Tue Apr 10 18:17:53 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)