Is there a test for sinus infections? How does dr. Know when to prescribe antibiotics?

Overall picture. A number of exam findings can suggest a sinus infection especially if >1 of them present eg "red streak sign" next to uvula, fever, swollen glands in the neck, pain with tapping over sinuses. History gives clues; eg symptoms were improving (eg virus) but suddenly worsened (secondary infection). Even if sinus infection, may not need antibiotics: if early, sometimes neti-pot & nasal steroid work.
Sinus infections. Best test is ct scan of the sinuses having said that, i almost never order it, since it's easy to recognize clinically and treat typical symptoms are a cold that won't go away because of persistent nasal congestion, loss of smell/taste, and purulent nasal discharge.