The firm establishment of gamma-ray sources of dark matter is often impeded by source confusion. Conventional astrophysical sources can mimic hypothetical dark matter sources, manifested in unidentified sources in the Fermi-LAT catalogues or in the GC excess. In statistical terms, the question of whether a sources is dark matter or conventional astrophsyics is an example of a non-standard hypothesis test where the usual chi-squared approximations do not apply because the hypotheses are not nested. We can reformulate the problem in a way that allows us to leverage methods developed to handle so called trial factors and obtain asymptotically valid frequentist tests. We illustrate the proposed method in a series of numerical studies that validate its power and false positive rate.