def METHOD_NAME(self):
    """Sorting threads by replies."""
    t1 = ThreadFactory()
    t1.new_post(t1.creator, "foo")
    t2 = ThreadFactory()
    t2.new_post(t2.creator, "bar")
    t2.new_post(t2.creator, "baz")
    threads = sort_threads(Thread.objects, 4)
    self.assertLessEqual(threads[0].replies, threads[1].replies)
    self.assertEqual(threads[0].replies, t1.replies)
    self.assertEqual(threads[1].replies, t2.replies)
    self.assertEqual(threads[0].title, t1.title)
    self.assertEqual(threads[1].title, t2.title)