@Amiable2know,
are you on pre-trial probation or sentenced probation?
is it a drug case?
technically as far as the law is concerned if its not ordered for drug testing during proceedings then they can not drug test you so you only gotta worry about it if it is ordered by the judge or if you are on pre trial or sentenced probation and if its ordered by probation it is illegal for them to drug test if it is not a drug case regardless. sometimes a Judge will order drug screens during proceedings before the trial anyways but if you are just going to court I wouldn't worry about it, theres so many legal technicalities protecting you from that even in the worst case scenario they did.