A mounting assembly for connecting a housing of an electrical fixture to an electrical junction box, in which a plate attached to the housing includes a locking member having an engager at a first end moveable relative to the plate between a first position and a second position. A locking post adapted for connecting to an electrical junction box includes a receiver for engaging the engager. The locking post secures the housing to the electrical junction box upon moving the locking member to the second position to engage the engager with the receiver of the locking post. A method of attaching a housing for an electrical fixture to an electrical junction box is disclosed.