def test_get_newest_results(self):
        """
        Get newest results
        """
        users = UserFactory.create_batch(2)
        events = EventFactory.create_batch(5)
        BetFactory(user=users[0], event=events[0])
        bet2 = BetFactory(user=users[0], event=events[1])
        bet3 = BetFactory(user=users[0], event=events[2])
        bet4 = BetFactory(user=users[0], event=events[3])
        bet5 = BetFactory(user=users[1], event=events[4])
        events[1].outcome = Event.CANCELLED
        events[1].save()
        events[2].outcome = Event.FINISHED_YES
        events[2].save()
        events[3].outcome = Event.FINISHED_NO
        events[3].save()
        events[4].outcome = Event.FINISHED_YES
        events[4].save()
        bet2.is_new_resolved = True
        bet2.save()
        bet3.is_new_resolved = True
        bet3.save()
        bet4.is_new_resolved = True
        bet4.save()
        bet5.is_new_resolved = True
        bet5.save()
        self.assertEqual([bet2, bet3, bet4], list(users[0].get_newest_results()))
        self.assertEqual([bet5], list(users[1].get_newest_results()))