def METHOD_NAME(extracted_update_file, testing_partition):
    updater = update_actions.OT2UpdateActions()
    img = os.path.join(extracted_update_file, "rootfs.ext4")
    cb = mock.Mock()
    updater.write_update(img, cb)
    filesize = open(testing_partition).seek(0, 2)
    call_count = filesize // 1024
    if call_count * 1024 != filesize:
        call_count += 1
    assert cb.call_count == call_count
    hasher = hashlib.sha256()
    hasher.update(open(testing_partition, "rb").read())
    hash_val = binascii.hexlify(hasher.digest())
    assert (
        hash_val
        == open(os.path.join(extracted_update_file, "rootfs.ext4.hash"), "rb")
        .read()
        .strip()
    )