def test_910_generateXML_deps(self): self._prepareDBWithDeps() xml = VersionsDB.generateXML() #print repr(xml) VersionsDB.loadString(xml) self.assertEquals(xml, VersionsDB.generateXML())
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())
def test_610_project_version_tag(self): def test(self): # check content of db r = VersionsDB.getRelease("R1") self.assertEquals(r["p1"].tag, None) self.assertEquals(r["p2"].tag, "DC06") # prepare db r = VersionsDB.Release("R1") r.add(VersionsDB.Project("p1", "v1r0")) r.add(VersionsDB.Project("p2", "v1r0", tag="DC06")) test(self) # check XML generation xml = VersionsDB.generateXML() VersionsDB.loadString(xml) test(self)
def test_600_release_date(self): def test(self): # check content of db r = VersionsDB.getRelease("R1") self.assertEquals(r.date, VersionsDB.DEFAULT_RELEASEDATE) r = VersionsDB.getRelease("R2") self.assertEquals(r.date, (2008, 5, 7)) # prepare db VersionsDB.Release("R1") VersionsDB.Release("R2", date=(2008, 5, 7)) test(self) # check XML generation xml = VersionsDB.generateXML() VersionsDB.loadString(xml) test(self)