We study experimentally and numerically the dynamics of colloidal beads confined by a harmonic potential in a bath of swimming E. coli bacteria. The resulting dynamics is well approximated by a Langevin equation for an overdamped oscillator driven by the combination of a white thermal noise and an exponentially correlated active noise. This scenario leads to a simple generalization of the equipartition theorem resulting in the coexistence of two different effective temperatures that govern dynamics along the flat and the curved directions in the potential landscape.