'Sorting threads by creator.'

def test_sorting_creator(self):

    u1 = UserFactory(username='foo')
    u2 = UserFactory(username='bar')
    ThreadFactory(creator=u1)
    ThreadFactory(creator=u2)
    threads = sort_threads(Thread.objects, 3, 1)
    self.assertEqual(threads[0].creator.username, u1.username)
    self.assertEqual(threads[1].creator.username, u2.username)
