def METHOD_NAME(tmpdir, manifest_data, digest, expected):
    apk_path = os.path.join(tmpdir, "app.apk")
    with ZipFile(apk_path, mode="w") as zip:
        zip.writestr("META-INF/MANIFEST.MF", manifest_data)
    assert manifest._does_apk_have_expected_digest(apk_path, digest) == expected