There would be a risk if those fluids had penetrated your urethra, but it would be also really rare just with a masturbation. You would need penetration or oral sex to get those fluids inside your urethra.
There is not really a need of any test, but If you want to make sure you are ok and for your mental peace, go to test for gono, syphilis, chlamydia and herpes after three weeks.
All the best,
DragonPulse.