diff options
author | Stefano Mancini <stefano.mancini@devinterface.com> | 2012-10-02 13:59:08 +0200 |
---|---|---|
committer | Stefano Mancini <stefano.mancini@devinterface.com> | 2012-10-02 13:59:08 +0200 |
commit | 59e0b3142b73586c38f948bc6ef6d083ca724e04 (patch) | |
tree | 4198cdbde7972f167dbc6aa7385a5861050e177f /group_messaging/tests.py | |
parent | 054848acd738cdf4e58956204a55a7ce18b4ac82 (diff) | |
parent | 8559f348eab0f59aa32d037a43d4a730112bab3c (diff) | |
download | askbot-59e0b3142b73586c38f948bc6ef6d083ca724e04.tar.gz askbot-59e0b3142b73586c38f948bc6ef6d083ca724e04.tar.bz2 askbot-59e0b3142b73586c38f948bc6ef6d083ca724e04.zip |
Merge branch 'master' of https://github.com/xponrails/askbot-devel
Diffstat (limited to 'group_messaging/tests.py')
-rw-r--r-- | group_messaging/tests.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/group_messaging/tests.py b/group_messaging/tests.py index 80f6f792..c8401dc1 100644 --- a/group_messaging/tests.py +++ b/group_messaging/tests.py @@ -51,11 +51,19 @@ class ModelTests(TestCase): #sender_group = get_personal_group(self.sender) #maybe add this too expected_recipients = set([recipient_group]) self.assertEqual(recipients, expected_recipients) - self.assertRaises( - MessageMemo.DoesNotExist, - MessageMemo.objects.get, - message=message - ) + #self.assertRaises( + # MessageMemo.DoesNotExist, + # MessageMemo.objects.get, + # message=message + #) + #make sure that the original senders memo to the root + #message is marke ad seen + memos = MessageMemo.objects.filter( + message=message, + user=self.sender + ) + self.assertEquals(memos.count(), 1) + self.assertEqual(memos[0].status, MessageMemo.SEEN) def test_get_senders_for_user(self): """this time send thread to a real group test that @@ -77,11 +85,13 @@ class ModelTests(TestCase): parent=root_message ) self.assertEqual(response.message_type, Message.STORED) + #assert that there is only one "seen" memo for the response memos = MessageMemo.objects.filter(message=response) self.assertEqual(memos.count(), 1) self.assertEqual(memos[0].user, self.recipient) self.assertEqual(memos[0].status, MessageMemo.SEEN) + #assert that recipients are the two people who are part of #this conversation recipients = set(response.recipients.all()) |