aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolaus Schulz <microschulz@web.de>2010-07-29 13:31:32 +0200
committerNikolaus Schulz <microschulz@web.de>2010-07-29 13:32:20 +0200
commit584918b26573c4510099f1cbc4d1f4904bd9c6eb (patch)
tree0632e2be6f39099986c1968d6b3d615e7a03b82d
parent9ff7774aba20846b171819b8e87c6a4525cff9f6 (diff)
downloadarchivemail-584918b26573c4510099f1cbc4d1f4904bd9c6eb.tar.gz
archivemail-584918b26573c4510099f1cbc4d1f4904bd9c6eb.tar.bz2
archivemail-584918b26573c4510099f1cbc4d1f4904bd9c6eb.zip
test suite: remove obsolete test that we preserve mbox file modes
This test case is obsolete since we no longer replace the mbox file with a new copy but rewrite it.
-rwxr-xr-xtest_archivemail.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/test_archivemail.py b/test_archivemail.py
index 36ff999..6eb300f 100755
--- a/test_archivemail.py
+++ b/test_archivemail.py
@@ -976,44 +976,6 @@ class TestArchiveSize(unittest.TestCase):
archivemail.options.min_size = None
-class TestArchiveMboxMode(TestCaseInTempdir):
- """file mode (permissions) of the original mbox should be preserved"""
- def setUp(self):
- super(TestArchiveMboxMode, self).setUp()
- archivemail.options.quiet = True
-
- def testOld(self):
- """after archiving, the original mbox mode should be preserved"""
- for mode in (0666, 0664, 0660, 0640, 0600):
- self.mbox_name = make_mbox(messages=1, hours_old=(24 * 181))
- os.chmod(self.mbox_name, mode)
- archivemail.archive(self.mbox_name)
- archive_name = self.mbox_name + "_archive.gz"
- assert os.path.exists(self.mbox_name)
- assert os.path.exists(archive_name)
- new_mode = os.stat(self.mbox_name)[stat.ST_MODE]
- self.assertEqual(mode, stat.S_IMODE(new_mode))
- archive_mode = os.stat(archive_name)[stat.ST_MODE]
- self.assertEqual(0600, stat.S_IMODE(archive_mode))
-
- def testNew(self):
- """after no archiving, the original mbox mode should be preserved"""
- for mode in (0666, 0664, 0660, 0640, 0600):
- self.mbox_name = make_mbox(messages=1, hours_old=(24 * 179))
- os.chmod(self.mbox_name, mode)
- archivemail.archive(self.mbox_name)
- archive_name = self.mbox_name + "_archive.gz"
- assert not os.path.exists(archive_name)
- assert os.path.exists(self.mbox_name)
- new_mode = os.stat(self.mbox_name)[stat.ST_MODE]
- self.assertEqual(mode, stat.S_IMODE(new_mode))
- os.remove(self.mbox_name)
-
- def tearDown(self):
- archivemail.options.quiet = False
- super(TestArchiveMboxMode, self).tearDown()
-
-
########## helper routines ############
def make_message(body=None, default_headers={}, hours_old=None, wantobj=False):