Not sure what you mean, if you are arrested and the police suspect you have taken illegal drugs they will test you for them.
All persons who are given a prison sentence get a drugs test on first arrival at prison it is compulsory. Do not see under what other circumstances a drugs test would be necessary. You know if you have taken them or not.
Thinking about it, certain jobs may specify a drugs test before you are offered employment this once happened to me, I was applying for a job in a drug company laboratory.