How old are your children? Old enough to say who they have been living with?
I think courts have seen a lot of this type of behaviour from disgruntled ex's. Yes you can have a drugs test, I would suggest it is harder for him to prove what he is saying is true than for you to prove it is a lie.
Your ex has hired a professional divorce attorney with no ethics, they play dirty and they will keep playing dirty until you give up. It is most likley not your ex's idea but he did agree to go along with it. Being up against a professional divorce attorney is grueling and will eat at you at every turn. Their dirty games will continue until you give up or your ex stops paying him, until such time get ready it is going to be a horrible ride.
Pay attention, most of the games they will play will be you having to prove a negative that will almost be impossible to prove. I had hidden millions how do you prove you do not have hidden millions but to go to a forensic accountant,,,,,very, very expensive. They look at every penny spent by cash, credit card, check and every deposit for three years back. Almost impossible but I did it and proved nothing was hidden. At one point I got so discourage trying to prove the negative that I said to the court if you would just order him to tell me where the money is hidden he can have it all. Stupid and not a fun game but the professionals play games like this all of the time. You will soon learn to admire people that get to have a normal divorce process. And do not be surprised if they start filing motions like this on you once a week, just another way to break you down, I had a new moion filed on me every week for 57 weeks. my heart goes out to you and hoefully I am wrong.