Said housing (30) for mounting an elongate-shaped container (20) on an injection pen comprises an elongate-shaped body (32) which extends along a longitudinal axis (X30) and which defines an interior volume (V32) for fully receiving the container. The body is provided, on the outside of a first axial end (34), with at least one first mechanical member (31) for attaching a needle. The body is further provided, in the vicinity of a second axial end (322) opposite the first axial end (34), with at least one second mechanical member for attaching the housing (30) onto an injection pen. The housing (30) further comprises, in the vicinity of the first axial end (34) thereof, at least one third mechanical member (36) for irreversibly locking a container (20) in position, fully contained in the interior volume (V32) of the body (32) of the housing (30). Said third locking member is formed by an elastically deformable tab (36) intended to ensure locking of the container (20) in position in the interior volume (V32) of the body (32) of the housing, by axially retaining a flange (26) of the container.