)]}'
{"cyborg/tests/unit/objects/test_device.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"a797af6f8f3d3e1a6769e51d0d3cc80f18a900ce","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            mock_device_get.assert_called_once_with(self.context, uuid)"},{"line_number":36,"context_line":"            self.assertEqual(self.context, device._context)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_get_by_id(self):"},{"line_number":39,"context_line":"        device_id \u003d self.fake_device[\u0027id\u0027]"},{"line_number":40,"context_line":"        with mock.patch.object(self.dbapi, \u0027device_get\u0027,"},{"line_number":41,"context_line":"                               autospec\u003dTrue) as mock_device_get:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_3bd8b650","line":38,"updated":"2019-12-20 04:01:30.000000000","message":"Would be good to check for DeviceNotFound exception if device_id is bad.","commit_id":"5a959d854dcb70bcdc3aed0a0b23a9b07efa94a2"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"69848357af0f19cc5aa75f689038f7ac7e92dd10","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            mock_device_get.assert_called_once_with(self.context, uuid)"},{"line_number":36,"context_line":"            self.assertEqual(self.context, device._context)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_get_by_id(self):"},{"line_number":39,"context_line":"        device_id \u003d self.fake_device[\u0027id\u0027]"},{"line_number":40,"context_line":"        with mock.patch.object(self.dbapi, \u0027device_get\u0027,"},{"line_number":41,"context_line":"                               autospec\u003dTrue) as mock_device_get:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_39cc3e33","line":38,"in_reply_to":"3fa7e38b_3bd8b650","updated":"2019-12-20 09:28:43.000000000","message":"Because [1] can not accept id. So if I add this situation, UT will raise error.\n[1]. https://github.com/openstack/cyborg/blob/master/cyborg/common/exception.py#L221\n\nWill update the exception in the series patch after solve exception define error.","commit_id":"5a959d854dcb70bcdc3aed0a0b23a9b07efa94a2"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"83e4ca02b32c323debe06e6737e3ed4adc8d5d6f","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            mock_device_get.assert_called_once_with(self.context, uuid)"},{"line_number":36,"context_line":"            self.assertEqual(self.context, device._context)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def test_get_by_id(self):"},{"line_number":39,"context_line":"        device_id \u003d self.fake_device[\u0027id\u0027]"},{"line_number":40,"context_line":"        with mock.patch.object(self.dbapi, \u0027device_get\u0027,"},{"line_number":41,"context_line":"                               autospec\u003dTrue) as mock_device_get:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_1e8e087a","line":38,"in_reply_to":"3fa7e38b_3bd8b650","updated":"2019-12-20 05:57:31.000000000","message":"Thanks. Agree. And I found that the device_get method only accept uuid[1]. So we should modify this to device_get_uuid and add device_get_by_id method in [1], like device_profile[2].\n[1]. https://github.com/openstack/cyborg/blob/master/cyborg/db/sqlalchemy/api.py#L397\n[2]. https://github.com/openstack/cyborg/blob/master/cyborg/db/sqlalchemy/api.py#L488-L497","commit_id":"5a959d854dcb70bcdc3aed0a0b23a9b07efa94a2"}]}
