add unit/integrted tests for dpc

This can be further simplified by removing the try/except block all together.