add missing test, rename field

 - Add missing test for associate_line_to_device in device service
 - Rename Line.device to Line.device_id