If they are long term out of work due solely to their drug use, they shouldn't carry on receiving benefits anyway. Unless there's a medical reason beyond their control, the focus behind any benefits should be to try and get them back into some form of work as soon as possible.
Drug tests wouldn't be necessary, they just would have to not get back into work in the time limit and then /not/ be able to prove they are physically unable to return.