I don't think this logic should be here. It will fail w/ the dotted notation as the intent is that the dotted can have arbitrarily many fields; thus, for the dotted format, you must use ```loc = loc_mapper().translate_locator_to_location(CourseLocator(course_id=course_id), get_course=True)```. You may need to add ```branch='published'``` to the ```CourseLocator``` instantiation.

Perhaps the right solution is to change ```CourseDescriptor.id_to_location``` to use the ```loc_mapper``` for dotted reprs.

Note: for your test to work, the course root location will have had to passed through ```loc_mapper().translate_location(location.course_id, location, True, True)``` once (which happens whenever you open a dashboard with the course in the list and other such places).