What is the shape of Parent that you pass in?
In general, PyMC3 tries to do shape inference, so if Parent has the right shape it should propagate. Setting of testval should not be necessary anymore.
In general, your approach looks sensible otherwise.