|
@@ -313,14 +313,14 @@ class ThreadMergeApiTests(ThreadsApiTestCase):
|
|
|
self.assertContains(response, other_thread.get_absolute_url(), status_code=200)
|
|
|
|
|
|
# posts reads are kept
|
|
|
- postread_set = self.user.postread_set.order_by('post_id')
|
|
|
+ postreads = self.user.postread_set.filter(post__is_event=False).order_by('id')
|
|
|
|
|
|
self.assertEqual(
|
|
|
- list(postread_set.values_list('post_id', flat=True)),
|
|
|
+ list(postreads.values_list('post_id', flat=True)),
|
|
|
[self.thread.first_post_id, other_thread.first_post_id]
|
|
|
)
|
|
|
- self.assertEqual(postread_set.filter(thread=other_thread).count(), 2)
|
|
|
- self.assertEqual(postread_set.filter(category=self.category_b).count(), 2)
|
|
|
+ self.assertEqual(postreads.filter(thread=other_thread).count(), 2)
|
|
|
+ self.assertEqual(postreads.filter(category=self.category_b).count(), 2)
|
|
|
|
|
|
def test_merge_threads_kept_subs(self):
|
|
|
"""api keeps other thread's subscription after merge"""
|