def test_instance_being_saved_is_updated(self):
        p = self.F.ProductFactory.create()
        self.F.ProductVersionFactory.create(version="2.9", product=p)
        pv = self.F.ProductVersionFactory.create(version="2.10", product=p)

        self.assertEqual(pv.order, 2)
        self.assertEqual(pv.latest, True)
Version being saved gets correct order after reorder.
dataset/ETHPy150Open mozilla/moztrap/tests/model/core/models/test_productversion.py/ProductVersionTest.test_instance_being_saved_is_updated