def get_test_plan(request, run_id):
    """Get the plan that this run is associated with.

    :param int run_id: run ID.
    :return: a mapping of found :class:`TestPlan`.
    :rtype: dict

    Example::

        TestRun.get_test_plan(1)
    """
    return TestRun.objects.select_related("plan").get(run_id=run_id).plan.serialize()