def METHOD_NAME(self):
    """TreesMap().get_tree_id_for_root() returns tree id for valid type name"""
    trees_map = TreesMap([THREAD_TYPE])
    trees_map.load()
    in_db_tree_id = Category.objects.get(special_role="root_category").tree_id
    tree_id = trees_map.get_tree_id_for_root("root_category")
    self.assertEqual(
        tree_id, in_db_tree_id, "root name didn't match one in database"
    )
    try:
        trees_map.get_tree_id_for_root("hurr_durr")
        self.fail("invalid root name should cause KeyError being raised")
    except KeyError as e:
        self.assertIn(
            '"hurr_durr" root has no tree defined',
            str(e),
            "invalid exception message as given",
        )