Nikolaus Schulz
a1641450ed
Added simple unittest for the --copy option. Mbox only. :-/
2007-11-02 18:21:21 +00:00
Nikolaus Schulz
256492039a
Added unittest for the new IMAP URL parser.
2007-10-23 23:23:44 +00:00
Nikolaus Schulz
700bce69b4
Testsuite: fixed testDeleteOldMail to check the right option.
2006-10-30 18:25:28 +00:00
Nikolaus Schulz
a8e76ead22
Testsuite: create temporary directory with prefix.
2006-10-29 04:05:37 +00:00
Nikolaus Schulz
93015a6d84
Dropped test from testsuite if dotlock file is world-readable, this isn't
...
required.
2006-10-29 03:59:57 +00:00
Nikolaus Schulz
5eb4cf3cf6
Replaced all tempfile.mktemp() calls with mkstemp()/mkdtemp().
...
Should just serve as a last security fallback, since we operate in a safe
temporary directory and everything should be okay anyway, but that may be less
obvious. :-)
2006-10-27 03:23:16 +00:00
Nikolaus Schulz
e491da3a11
test_archivemail.py: fixed unsafe creation of temporary files.
...
Derive all testcases that create temporary files from the new class
TestCaseInTempdir, which provides standard fixtures to set up a secure temporary
root directory for tempfiles and cleaning up afterwards. This also simplifies
the code.
This addresses Debian bug #385253 , and reading the BTS log, it seems this issue
was assigned CVE-2006-4245, although I cannot find any further reference to that
CVE. Note that the bug was initially reported to affect archivemail itself,
too. This is not correct. There *are* race conditions with archivemail, but
they were not subject of that report, and are not that critical.
Also bumped python dependency to version 2.3 since we use tempfile.mkstemp() and
other recent stuff.
2006-10-27 02:12:45 +00:00
Nikolaus Schulz
0a666a10a6
test_archivemail.py: added two missing self.setUp() calls in the TestArchiveMbox
...
testcase.
2006-10-27 01:30:49 +00:00
Nikolaus Schulz
7ae1b7bb3f
test_archivemail.py: put standard setUp() fixtures in the testcases; the
...
matching tearDown() methods were already there.
We surely can move more (possibly duplicated) stuff into the setUp() methods
later.
2006-10-27 01:00:39 +00:00
Nikolaus Schulz
ee45d946ed
test_archivemail.py: don't check for os.fork(), simply use it -- we're targeting
...
posix platforms only.
2006-10-27 00:13:48 +00:00
Nikolaus Schulz
06d158c576
Fixed unittest TestMboxExclusiveLock: on some systems flock(2) is emulated with
...
fcntl(2) calls. fcntl locks don't support interlocking within a process, so we
need to fork() to correctly test them.
2006-10-20 22:50:38 +00:00
Nikolaus Schulz
d631079250
Added maintainer entry in setup.py.
...
Updated copyright notices in archivemail.py and test_archivemail.py.
2006-10-12 23:02:03 +00:00
Nikolaus Schulz
a6ff806d2a
Fixed unittest failure by updating --suffix testcase: archivemail used to expand
...
date directives in the suffix to the current date, but rev. 94 changed that to
the archive cut off date. Based on analysis by Peter Poeml. Thanks, Peter.
2006-10-01 02:32:19 +00:00
Paul Rodger
799f4affcd
Removed a test rule that says we can confidently archive messages
...
older than the unix epoch. (New versions of python return OverFlow
error instead)
2002-10-30 23:51:08 +00:00
Paul Rodger
518654df61
We now call mkdir() to create a temporary directory to store any generated
...
tempfiles. This should be a lot more secure.
2002-05-20 06:14:54 +00:00
Paul Rodger
7c8b58dea3
Fixed a bug where archivemail would abort if it got a date header
...
with a completely blank value.
2002-05-07 12:14:29 +00:00
Paul Rodger
dcff0c0c85
Added a --size option to only archive messages over a certain byte size.
2002-04-29 12:20:45 +00:00
Paul Rodger
244c88d4b9
Added a lot more tests to test_archivemail.py.
2002-04-28 04:04:49 +00:00
Paul Rodger
bc41b68389
Fixed a bug where the long --suffix option was not working (although the
...
short option, '-s' was).
Added time-based format directives to the --suffix option, so that you
can do things like specify --suffix='%B%Y' to create archives named
after the current month and year.
Added some more tests to test_archivemail.py
2002-04-27 06:08:45 +00:00
Paul Rodger
9736dff04d
Fixed bugs where archivemail would refuse to work on python version less than
...
2.2.
2002-04-26 03:04:02 +00:00
Paul Rodger
f1f2b97b1b
Added another test, got ready for 0.4.2 release.
2002-04-24 13:22:11 +00:00
Paul Rodger
14d58baee1
Added a lot more system tests.
...
Hopefully I haven't gone too overboard with 957 lines of testing code for
a 1100 line program :)
2002-04-24 07:44:59 +00:00
Paul Rodger
2bfde528cd
Added the ability to archive messages older than a given absolute date with
...
the new option '--date' and fixed a bug where archivemail would complain about
messages older than 1970.
2002-04-23 03:01:26 +00:00
Paul Rodger
1bd93b6d08
Got ready for release of version 4.1 in a couple of days.
2002-04-19 07:12:49 +00:00
Paul Rodger
fd61a98c46
Grouped together tests more into their respective classes.
2002-04-17 13:13:36 +00:00
Paul Rodger
ee9757de78
Added an option '--no-compress' if you don't want gzipped archives.
...
Added an option '--preserve-unread' to always preserved (don't archive)
unread messages.
2002-04-17 06:26:31 +00:00
Paul Rodger
0203bed0c4
Added docbook documentation from which we can generate a manpage.
2002-04-12 14:46:09 +00:00
Paul Rodger
9e534977ef
Stopped calling gzip externally and started using the 'gzip' module
...
directly. Removed bzip2 and compress support since they were complicating
things and you don't really need them much anyway.
2002-04-12 05:31:59 +00:00
Paul Rodger
07ab0ae773
Getting ready for v0.3 release.
2002-04-11 10:23:16 +00:00
Paul Rodger
d27832f818
We now have 37 tests, including chmod() tests to make sure permissions
...
on original mbox mailboxes have been preserved.
2002-04-11 03:48:13 +00:00
Paul Rodger
314cb64484
Added a couple more (possibly stupid) tests and added docstrings for
...
all existing tests so it looks nicer when run verbosely.
2002-04-09 13:00:06 +00:00
Paul Rodger
35a9f14982
We now preserve the last-accessed and last-modified timestamps correctly.
...
Fixed a bug where lockfiles were being created that were not
world-readable.
Made archivemail work better when used as a python module so it can
integrate better with unittest.
Renamed unittest script 'test_archivemail' instead of 'archivemail_test'
and added about 20 more tests.
2002-04-08 13:39:03 +00:00