def test_editing_a_version_reorders(self):
        # @@@ what about bulk update of product versions?
        p = self.F.ProductFactory.create()
        self.F.ProductVersionFactory.create(version="2.11", product=p)
        self.F.ProductVersionFactory.create(version="2.9", product=p)
        pv = self.F.ProductVersionFactory.create(version="2.12", product=p)

        pv.version = "2.10"
        pv.save()

        self.assertEqual(
            [(v.version, v.latest) for v in p.versions.all()],
            [("2.9", False), ("2.10", False), ("2.11", True)]
            )
Convert the characters &, <, >, ' and " in string s to HTML-safe
dataset/ETHPy150Open mozilla/moztrap/tests/model/core/models/test_productversion.py/ProductVersionTest.test_editing_a_version_reorders--crossover with--dataset/ETHPy150Open syrusakbary/pyjade/pyjade/runtime.py/escape