From 50a3eb64f0793bf8440bafa6b4d7391a7dee5560 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 6 Jan 2015 15:36:58 +0000 Subject: [PATCH] Clean up image records created in test_duplicate_filters; we can't rely on the usual transaction logic to do this when using multiple threads. Fixes #892 --- wagtail/wagtailimages/tests/test_models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wagtail/wagtailimages/tests/test_models.py b/wagtail/wagtailimages/tests/test_models.py index d09339699..059653681 100644 --- a/wagtail/wagtailimages/tests/test_models.py +++ b/wagtail/wagtailimages/tests/test_models.py @@ -421,6 +421,8 @@ class TestIssue312(TestCase): for width in range(10, 100, 10): image.get_rendition('width-%d' % width) + image.delete() + # this block opens multiple database connections, which need to be closed explicitly # so that we can drop the test database at the end of the test run connection.close()