From 861baecd844bf0b1c153be18639bb285e75ec1d7 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 10 May 2010 12:39:53 +0000 Subject: [PATCH] Fixed #13509 -- Modified the comment tests so that signal cleanup doesn't rely on garbage collection. Thanks to Alex Gaynor for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13204 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- .../regressiontests/comment_tests/tests/comment_view_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/regressiontests/comment_tests/tests/comment_view_tests.py b/tests/regressiontests/comment_tests/tests/comment_view_tests.py index bb84ab788e..f02dca4a89 100644 --- a/tests/regressiontests/comment_tests/tests/comment_view_tests.py +++ b/tests/regressiontests/comment_tests/tests/comment_view_tests.py @@ -174,12 +174,13 @@ class CommentViewTests(CommentTestCase): actually getting saved """ def receive(sender, **kwargs): return False - signals.comment_will_be_posted.connect(receive) + signals.comment_will_be_posted.connect(receive, dispatch_uid="comment-test") a = Article.objects.get(pk=1) data = self.getValidData(a) response = self.client.post("/post/", data) self.assertEqual(response.status_code, 400) self.assertEqual(Comment.objects.count(), 0) + signals.comment_will_be_posted.disconnect(dispatch_uid="comment-test") def testWillBePostedSignalModifyComment(self): """