Shorting across the wires, may or may not indicate a problem with the switch. For example, it doesn't rule out a break in the wires somewhere further towards the light.
If shorting the switch works, then it is the switch. However, if shorting has no effect, then to be sure it is not the switch, unplug the wires and, using a continuity meter, measure the resistance across the switch ends. Resistance should read infinite when not engaged, and zero when the brake lever is pulled.