Fixes typo in KM.api property getter

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