Add tests for setting device's parent list directly

(test for the fix 5ccfa39ab1dc917d85d76aadcb0cf08e60fde31c)