UTI medication can affect a drug test, but it is unlikely that this would happen. That is because the urine will be diluted or clear and it will not show up on a drug screen due to how sensitive they are. If you were taking antibiotics, there might be some residual effects in your system for testing purposes though. The best thing to do if you have an upcoming drug test follow the directions of your doctor about when to stop taking these medications so that no traces remain in your system;