From c370da781692c42881c02b64b778a908bf35dce9 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 14 Mar 2012 13:08:03 -0700 Subject: test_archive_maildir_created(): I was dumb when I rewrote Toshio's original test. Undumbify that. --- src/mailman/archiving/tests/test_prototype.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mailman/archiving/tests/test_prototype.py b/src/mailman/archiving/tests/test_prototype.py index 9c229db1c..969043aa4 100644 --- a/src/mailman/archiving/tests/test_prototype.py +++ b/src/mailman/archiving/tests/test_prototype.py @@ -106,8 +106,11 @@ but the water deserves to be swum. # Check that the directory structure has been created and we have one # more file (the archived message) than expected directories. archived_messages = all_filenames - self._expected_dir_structure - self.assertEqual(self._expected_dir_structure, - all_filenames - archived_messages) + self.assertEqual(len(archived_messages), 1) + self.assertTrue( + archived_messages.pop().startswith( + os.path.join(config.ARCHIVE_DIR, 'prototype', + self._mlist.fqdn_listname, 'new'))) def test_archive_maildir_existence_does_not_raise(self): # Archiving a second message does not cause an EEXIST to be raised -- cgit v1.2.3-70-g09d2