Fixes typo in KM.api property getter

Also added an anaemic test, can be leaved out. If you merge, could you push it to PyPI as well?

Thanks!