Example #1
0
 def test_900_generateXML(self):
     data = [
         ("R1", None, [("P1", "v1r0"), ("P2", "v1r0"), ("P3", "v1r0"),
                       ("P4", "v1r0")]),
         ("R2", None, [("P1", "v2r0"), ("P2", "v2r0"), ("P3", "v1r0"),
                       ("P4", "v1r0")]),
         ("R3", None, [("P1", "v3r0"), ("P2", "v2r0"), ("P3", "v2r0"),
                       ("P4", "v1r0")]),
         ("R4", None, [("P1", "v4r0"), ("P2", "v2r0"), ("P3", "v2r0"),
                       ("P4", "v2r0")]),
         ("R5", "R4", [("P3", "v3r0")]),
         ("R6", None, [("P1", "v5r0"), ("P2", "v2r0"), ("P3", "v4r0"),
                       ("P4", "v3r0")]),
     ]
     self._fillDB(data)
     VersionsDB.addUnversionedProject("U1")
     VersionsDB.addUnversionedProject("U2").addRunTimeDep("U1")
     xml = VersionsDB.generateXML()
     #print repr(xml)
     VersionsDB.loadString(xml)
     self.assertEquals(xml, VersionsDB.generateXML())
Example #2
0
    def test_500_unversioned_projects(self):
        r = VersionsDB.Release("r1")
        r["a"] = "v1r0"
        r["b"] = "v1r0"
        r["c"] = "v1r0"
        VersionsDB.addUnversionedProject("u1")
        VersionsDB.addUnversionedProject("u2").addRunTimeDep("u1")

        r["b"].addRunTimeDep("u2")
        r["c"].addRunTimeDep("b")

        rtd = r.expandRunTimeDeps("c")
        rtd.sort()
        self.assertEquals(rtd, ["b", "u1", "u2"])

        expected = [("b", "v1r0"), ("u1", ""), ("u2", "")]
        rtv = VersionsDB.getRuntimeVersions("c", "v1r0", "a")
        rtv.sort()
        self.assertEquals(rtv, expected)

        self.assertEquals([p.name for p in r.allProjects()],
                          ["a", "u1", "u2", "b", "c"])