def get_tags(request, run_id):
    """Get the list of tags attached to this run.

    :param int run_id: run ID.
    :return: a mapping representing found :class:`TestTag`.
    :rtype: dict

    Example::

        TestRun.get_tags(1)
    """
    tr = TestRun.objects.get(run_id=run_id)

    tag_ids = tr.tag.values_list("id", flat=True)
    query = {"id__in": tag_ids}
    return TestTag.to_xmlrpc(query)