Fixed a typo in the comments tests, as well as a dependency on CPython's reference counting semantics.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor 2010-10-09 23:04:49 +00:00
parent b61cafb146
commit 41551a0274
1 changed files with 8 additions and 4 deletions

View File

@ -160,13 +160,18 @@ class CommentViewTests(CommentTestCase):
# Connect signals and keep track of handled ones # Connect signals and keep track of handled ones
received_signals = [] received_signals = []
excepted_signals = [signals.comment_will_be_posted, signals.comment_was_posted] expected_signals = [
for signal in excepted_signals: signals.comment_will_be_posted, signals.comment_was_posted
]
for signal in expected_signals:
signal.connect(receive) signal.connect(receive)
# Post a comment and check the signals # Post a comment and check the signals
self.testCreateValidComment() 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): def testWillBePostedSignal(self):
""" """
@ -251,4 +256,3 @@ class CommentViewTests(CommentTestCase):
broken_location = location + u"\ufffd" broken_location = location + u"\ufffd"
response = self.client.get(broken_location) response = self.client.get(broken_location)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)