summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2010-10-09 23:05:09 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2010-10-09 23:05:09 +0000
commit5d9140c137fa369e7c033f08685751d85cae28ff (patch)
tree8e1c2692a0ca1ab0e4ad620ed3e514ae604f72dd /tests
parent846febeb7abc935b986d168432323c49a3ee6735 (diff)
[1.2.X] Fixed a typo in the comments tests, as well as a dependency on CPython's reference counting semantics. Backport of [14098].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/comment_tests/tests/comment_view_tests.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/regressiontests/comment_tests/tests/comment_view_tests.py b/tests/regressiontests/comment_tests/tests/comment_view_tests.py
index f02dca4a89..49c6450e15 100644
--- a/tests/regressiontests/comment_tests/tests/comment_view_tests.py
+++ b/tests/regressiontests/comment_tests/tests/comment_view_tests.py
@@ -160,13 +160,18 @@ class CommentViewTests(CommentTestCase):
# Connect signals and keep track of handled ones
received_signals = []
- excepted_signals = [signals.comment_will_be_posted, signals.comment_was_posted]
- for signal in excepted_signals:
+ expected_signals = [
+ signals.comment_will_be_posted, signals.comment_was_posted
+ ]
+ for signal in expected_signals:
signal.connect(receive)
# Post a comment and check the signals
self.testCreateValidComment()
- self.assertEqual(received_signals, excepted_signals)
+ self.assertEqual(received_signals, expected_signals)
+
+ for signal in expected_signals:
+ signal.disconnect(receive)
def testWillBePostedSignal(self):
"""
@@ -251,4 +256,3 @@ class CommentViewTests(CommentTestCase):
broken_location = location + u"\ufffd"
response = self.client.get(broken_location)
self.assertEqual(response.status_code, 200)
-