No, you got pregnant BEFORE you got on the shot, because a pregnancy test is not accurate until TWO WEEKS after fertilization - this means you absolutely MUST have gotten pregnant before the shot was injected, if only one week in you tested and realized you were pregnant.
It is possible that at the end of the 3 months, the protection had weakened enough to allow you to ovulate.
Considering how long it takes most women to return to a normal cycle after getting off of depo, it's very rare for cases like yours to occur.
No form of birth control is 100% except for a complete hysterectomy or abstinence.