rename line.device to line.device_id
make test more explicit, use concrete mocks
check all fields in line model
Merge branch 'add_device_id_to_line'