Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.2.X] Fixed a typo in the comments tests, as well as a dependency o…

…n 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
  • Loading branch information...
commit 5d9140c137fa369e7c033f08685751d85cae28ff 1 parent 846febe
@alex alex authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 tests/regressiontests/comment_tests/tests/comment_view_tests.py
View
12 tests/regressiontests/comment_tests/tests/comment_view_tests.py
@@ -160,13 +160,18 @@ def receive(sender, **kwargs):
# 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 @@ def testCommentPostRedirectWithInvalidIntegerPK(self):
broken_location = location + u"\ufffd"
response = self.client.get(broken_location)
self.assertEqual(response.status_code, 200)
-
Please sign in to comment.
Something went wrong with that request. Please try again.