Use correct apt module functions

candidateOrigin has been replaced by candidate.origins
isUpgradable should be is_upgradable