Fix confusion of type_id and type in tests

test_successful_subscriptions_notifies_pm and
test_successful_subscriptions_notifies_stream were both asserting
type_id and not type with the Recipient.PERSONAL and Recipient.STREAM
values.

(imported from commit 26492f9c725c278ac81570a135dc9cc203213cbd)
This commit is contained in:
Jason Michalski 2014-01-23 12:05:41 -05:00
parent 759d33fad1
commit 6d332151d2
1 changed files with 2 additions and 2 deletions

View File

@ -2085,7 +2085,7 @@ class SubscriptionAPITest(AuthedTestCase):
self.assert_json_success(result) self.assert_json_success(result)
msg = Message.objects.latest('id') msg = Message.objects.latest('id')
self.assertEqual(msg.recipient.type_id, Recipient.PERSONAL) self.assertEqual(msg.recipient.type, Recipient.PERSONAL)
self.assertEqual(msg.sender_id, self.assertEqual(msg.sender_id,
get_user_profile_by_email('notification-bot@zulip.com').id) get_user_profile_by_email('notification-bot@zulip.com').id)
expected_msg = "Hi there! %s just created a new stream '%s'. " \ expected_msg = "Hi there! %s just created a new stream '%s'. " \
@ -2123,7 +2123,7 @@ class SubscriptionAPITest(AuthedTestCase):
self.assert_json_success(result) self.assert_json_success(result)
msg = Message.objects.latest('id') msg = Message.objects.latest('id')
self.assertEqual(msg.recipient.type_id, Recipient.STREAM) self.assertEqual(msg.recipient.type, Recipient.STREAM)
self.assertEqual(msg.sender_id, self.assertEqual(msg.sender_id,
get_user_profile_by_email('notification-bot@zulip.com').id) get_user_profile_by_email('notification-bot@zulip.com').id)
expected_msg = "%s just created a new stream `%s`. " \ expected_msg = "%s just created a new stream `%s`. " \