fix oversight, cleanup unittest and make sure it fails without the getAllMetadata call in get_cm