I sincerely doubt you will be tested at court. If you are under a no-use condition of release, and you look high, then maybe, who knows. I've never heard of a drug test at court. If you haven't pled and aren't under any conditions, then I doubt you could be compelled to submit to a test.
However, you'll probably end up on probation and be subject to tests through corrections.
Strange distinction in the law...it's not a crime to be high, but it's a crime to possess. So, even if you were somehow compelled to submit to a test you won't be charged with anything--your terms of release may change though.