def check(tmpdir): with open(pjoin(str(tmpdir), "glsa-200611-01.xml"), "w") as f: f.write(mk_glsa(("dev-util/diffball", ([], [">0.7"])))) with open(pjoin(str(tmpdir), "glsa-200611-02.xml"), "w") as f: f.write(mk_glsa(("dev-util/diffball", ([], ["~>=0.5-r3"])))) return glsa.GlsaCheck( misc.Options(glsa_location=str(tmpdir), glsa_enabled=True))
def mk_glsa(self, feed): for idx, data in enumerate(feed): with open(pjoin(self.dir, "glsa-200611-%02i.xml" % idx), "w") as f: f.write(mk_glsa(data))