From 3d7878e1088138fbc3971313a74c91b79bbea643 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Mon, 18 Nov 2013 17:52:25 +0100 Subject: Improve and write tests for the set_thread_votes function --- hyperkitty/tests/test_views.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hyperkitty/tests/test_views.py') diff --git a/hyperkitty/tests/test_views.py b/hyperkitty/tests/test_views.py index 948b621..f9a1ac7 100644 --- a/hyperkitty/tests/test_views.py +++ b/hyperkitty/tests/test_views.py @@ -179,10 +179,14 @@ class MessageViewsTestCase(TestCase): self.user = User.objects.create_user( 'testuser', 'test@example.com', 'testPass') # Fake KittStore + class FakeThread(object): + thread_id = None class FakeMessage(object): def __init__(self, h): self.message_id_hash = h self.list_name = "list@example.com" + self.thread = FakeThread() + self.thread.thread_id = h self.store = Mock() self.store.get_message_by_hash_from_list.side_effect = \ lambda l, h: FakeMessage(h) -- cgit