You better use 3 caps. Two from the leads to the casing and on between the leads.
The bad thing is that's not very wise for the capacitor to use it between the leads.
It's bad to apply voltage at capacitors (and current to coils)... But the inductive behavior of the motor
will make it act as a band pass parallel filter. So you must pick up the PWM frequency correctly...
The above just for you to know.
There are methods of estimating the induction of the motor's coils, but you will need a scope and a function generator.
Well from the function generator you will need only a variable frequency sine wave, but just saying...
Well.... the above is just for your information if you have the means to do a precise work...
For the leads to the case place 0.1uF@63V ceramic capacitors.
For the lead to lead capacitor, you either calculate the value with the above method OR just place another ceramic,
just like the above (0.1uF@63V) and these are gonna get you running fine
Best Regards, Lefteris
Greece