summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-05-10 12:43:05 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-05-10 12:43:05 +0000
commit5a43a33161d1ff0bca573f277058803ce687449b (patch)
treec063e652ae64e3cd3e5d36812094e50075fc1d85
parent6bc070ba4cc687bea93fab5b9122063c9d51d1e6 (diff)
downloaddjango-5a43a33161d1ff0bca573f277058803ce687449b.tar.gz
[1.1.X] 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.
Backport of r13204 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/regressiontests/comment_tests/tests/comment_view_tests.py3
1 files changed, 2 insertions, 1 deletions
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):
"""