Tests for set_device_data