From ac49e4c485345058d2ee582b9966f441b2349738 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sun, 6 Nov 2011 18:20:08 -0500 Subject: * Stop adding the X-BeenThere header. * Separate out the RFC 2369 header adding handler. * Dynamically calculate the `List-Id` header instead of storing it in the database. This means it cannot be changed. * Be sure to clean out any digest .mmdf files when the world is reset. --- src/mailman/testing/helpers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mailman/testing/helpers.py') diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py index a7fc4e289..de35be8be 100644 --- a/src/mailman/testing/helpers.py +++ b/src/mailman/testing/helpers.py @@ -353,7 +353,7 @@ def reset_the_world(): """Reset everything: * Clear out the database - * Remove all residual queue files + * Remove all residual queue and digest files * Clear the message store * Reset the global style manager @@ -362,6 +362,11 @@ def reset_the_world(): """ # Reset the database between tests. config.db._reset() + # Remove any digest files. + for dirpath, dirnames, filenames in os.walk(config.LIST_DATA_DIR): + for filename in filenames: + if filename.endswith('.mmdf'): + os.remove(os.path.join(dirpath, filename)) # Remove all residual queue files. for dirpath, dirnames, filenames in os.walk(config.QUEUE_DIR): for filename in filenames: -- cgit v1.2.3-70-g09d2