def test_from_disk(self): with tempfile.TemporaryDirectory() as tmpd: out_file = os.path.join(tmpd, os.path.basename(ALEMBIC_PKT_URL)) out_key = out_file + '.asc' attempt_to_download(ALEMBIC_PKT_URL, out_file) attempt_to_download(ALEMBIC_PKT_URL + '.asc', out_key) result = from_disk(out_file, out_key) self.assertTrue(result)
def test_result_on_non_existent_pkg_path(self): result = from_disk('NonExistentPKG.tar.gz', 'NonExistentKey.asc') self.assertTrue(result is None)