)]}'
{"trove/guestagent/common/operating_system.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"5a3f61137c726bf9ee0fa980769c5d74ade42513","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            convert_func \u003d codec.serialize"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if as_root:"},{"line_number":67,"context_line":"            return _read_file_as_root(path, codec, open_flag, convert_func)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        with open(path, open_flag) as fp:"},{"line_number":70,"context_line":"            return convert_func(fp.read())"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f9dbf25_5ccb67a4","line":67,"updated":"2018-02-28 10:47:35.000000000","message":"We changed args list. I think we should cover this with some unittest.","commit_id":"3f9205fbb8ac9fcda02642b8fe53e3084eb80640"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"9e91e1422401bc2c4ee2aeec24c3edda0d1e302c","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            convert_func \u003d codec.serialize"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if as_root:"},{"line_number":67,"context_line":"            return _read_file_as_root(path, codec, open_flag, convert_func)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        with open(path, open_flag) as fp:"},{"line_number":70,"context_line":"            return convert_func(fp.read())"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f9dbf25_bc186bd3","line":67,"in_reply_to":"1f9dbf25_5ccb67a4","updated":"2018-02-28 11:07:24.000000000","message":"Sounds reasonable, I think the codec tests in test_operating_system covered all these changes in this patch, but more unittests would be better, we don\u0027t have many unittests for read_file/_read_file_as_root and write_file/_write_file_as_root.\n\nThanks, I\u0027ll add some more unittests for this change.","commit_id":"3f9205fbb8ac9fcda02642b8fe53e3084eb80640"}],"trove/tests/unittests/guestagent/test_operating_system.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # use getattr to avoid pylint \u0027no-member\u0027 warning"},{"line_number":233,"context_line":"        mock_file \u003d getattr(operating_system, \u0027open\u0027)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        # simple read"},{"line_number":236,"context_line":"        operating_system.read_file(test_path)"},{"line_number":237,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027r\u0027)"},{"line_number":238,"context_line":"        mock_file().read.assert_called_once()"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_11f36e0c","line":235,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # use getattr to avoid pylint \u0027no-member\u0027 warning"},{"line_number":233,"context_line":"        mock_file \u003d getattr(operating_system, \u0027open\u0027)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        # simple read"},{"line_number":236,"context_line":"        operating_system.read_file(test_path)"},{"line_number":237,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027r\u0027)"},{"line_number":238,"context_line":"        mock_file().read.assert_called_once()"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_1a613e37","line":235,"in_reply_to":"1f9dbf25_11f36e0c","updated":"2018-03-02 01:58:11.000000000","message":"Two new unittests added here, one for read_file, another one for write_file. As the changes to these two functions introduced in the patch are:\n\n- use binary mode when opening a file is serializing/deserializing is not needed\n- use a temporary varialbe to hold the actual function to dealing with the file content\n- pass the file flag and convert function to _read_file_as_root/_write_file_as_root (i.e. the arguments of these two functions has been changed)\n\nSo the two newly added unittests is quite straightforward, to ensure the correct file opening flag and coverting function are used in the function calling stacks. I could not see any benefit from splitting these checking to different testing functions.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"40c22a633e1a6ecc0e8faa2588db8630dca47ff5","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # use getattr to avoid pylint \u0027no-member\u0027 warning"},{"line_number":233,"context_line":"        mock_file \u003d getattr(operating_system, \u0027open\u0027)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        # simple read"},{"line_number":236,"context_line":"        operating_system.read_file(test_path)"},{"line_number":237,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027r\u0027)"},{"line_number":238,"context_line":"        mock_file().read.assert_called_once()"}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_e4470cbc","line":235,"in_reply_to":"1f9dbf25_1a613e37","updated":"2018-03-20 14:12:26.000000000","message":"IMO each test should check only one scenario, but in this specific case is not that crucial to split it.\n\nOk, i\u0027m ok with this change.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"23ca00160f3b8c36a22aae67d7ed96f49316c321","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # use getattr to avoid pylint \u0027no-member\u0027 warning"},{"line_number":233,"context_line":"        mock_file \u003d getattr(operating_system, \u0027open\u0027)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        # simple read"},{"line_number":236,"context_line":"        operating_system.read_file(test_path)"},{"line_number":237,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027r\u0027)"},{"line_number":238,"context_line":"        mock_file().read.assert_called_once()"}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_55b8d6e3","line":235,"in_reply_to":"df7087c5_e4470cbc","updated":"2018-03-21 01:28:50.000000000","message":"Thanks a lot for helping on this, :)","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        mock_deserialize.called_once_with(test_data)"},{"line_number":240,"context_line":"        mock_file.reset_mock()"},{"line_number":241,"context_line":"        mock_deserialize.reset_mock()"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        # read with decode\u003dFalse"},{"line_number":244,"context_line":"        operating_system.read_file(test_path, decode\u003dFalse)"},{"line_number":245,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027rb\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_31f8eae3","line":242,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        mock_deserialize.called_once_with(test_data)"},{"line_number":240,"context_line":"        mock_file.reset_mock()"},{"line_number":241,"context_line":"        mock_deserialize.reset_mock()"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        # read with decode\u003dFalse"},{"line_number":244,"context_line":"        operating_system.read_file(test_path, decode\u003dFalse)"},{"line_number":245,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027rb\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_ba55aa52","line":242,"in_reply_to":"1f9dbf25_31f8eae3","updated":"2018-03-02 01:58:11.000000000","message":"ditto.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        mock_serialize.reset_mock()"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # checking _read_file_as_root arguments"},{"line_number":252,"context_line":"        with patch.object(operating_system,"},{"line_number":253,"context_line":"                          \u0027_read_file_as_root\u0027) as mock_read_file_as_root:"},{"line_number":254,"context_line":"            # simple read as root,"},{"line_number":255,"context_line":"            operating_system.read_file(test_path, as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_d1dc2676","line":252,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        mock_serialize.reset_mock()"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # checking _read_file_as_root arguments"},{"line_number":252,"context_line":"        with patch.object(operating_system,"},{"line_number":253,"context_line":"                          \u0027_read_file_as_root\u0027) as mock_read_file_as_root:"},{"line_number":254,"context_line":"            # simple read as root,"},{"line_number":255,"context_line":"            operating_system.read_file(test_path, as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_da52f667","line":252,"in_reply_to":"1f9dbf25_d1dc2676","updated":"2018-03-02 01:58:11.000000000","message":"ditto.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                test_path, \u0027rb\u0027, mock_serialize)"},{"line_number":265,"context_line":"            mock_serialize.assert_not_called()"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        # simple read as root"},{"line_number":268,"context_line":"        temp_file \u003d tempfile.NamedTemporaryFile(\u0027r\u0027)"},{"line_number":269,"context_line":"        with patch.object(tempfile, \u0027NamedTemporaryFile\u0027,"},{"line_number":270,"context_line":"                          return_value\u003dtemp_file) as mock_temp_file:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_f1d92283","line":267,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                test_path, \u0027rb\u0027, mock_serialize)"},{"line_number":265,"context_line":"            mock_serialize.assert_not_called()"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        # simple read as root"},{"line_number":268,"context_line":"        temp_file \u003d tempfile.NamedTemporaryFile(\u0027r\u0027)"},{"line_number":269,"context_line":"        with patch.object(tempfile, \u0027NamedTemporaryFile\u0027,"},{"line_number":270,"context_line":"                          return_value\u003dtemp_file) as mock_temp_file:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_7a4f22bd","line":267,"in_reply_to":"1f9dbf25_f1d92283","updated":"2018-03-02 01:58:11.000000000","message":"ditto.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        mock_chmod.reset_mock()"},{"line_number":283,"context_line":"        mock_deserialize.reset_mock()"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        # read as root with decode\u003dFalse"},{"line_number":286,"context_line":"        temp_file \u003d tempfile.NamedTemporaryFile(\u0027rb\u0027)"},{"line_number":287,"context_line":"        with patch.object(tempfile, \u0027NamedTemporaryFile\u0027,"},{"line_number":288,"context_line":"                          return_value\u003dtemp_file) as mock_temp_file:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_51e9f617","line":285,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        mock_chmod.reset_mock()"},{"line_number":283,"context_line":"        mock_deserialize.reset_mock()"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        # read as root with decode\u003dFalse"},{"line_number":286,"context_line":"        temp_file \u003d tempfile.NamedTemporaryFile(\u0027rb\u0027)"},{"line_number":287,"context_line":"        with patch.object(tempfile, \u0027NamedTemporaryFile\u0027,"},{"line_number":288,"context_line":"                          return_value\u003dtemp_file) as mock_temp_file:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_9a4c6ec8","line":285,"in_reply_to":"1f9dbf25_51e9f617","updated":"2018-03-02 01:58:11.000000000","message":"ditto.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":305,"context_line":"    @patch.object(IdentityCodec, \u0027serialize\u0027,"},{"line_number":306,"context_line":"                  return_value\u003d\u0027SerializedData\u0027)"},{"line_number":307,"context_line":"    @patch.object(operating_system, \u0027open\u0027, mock_open())"},{"line_number":308,"context_line":"    def test_write_file_with_flags_and_conv_func(self, mock_serialize,"},{"line_number":309,"context_line":"                                                 mock_deserialize,"},{"line_number":310,"context_line":"                                                 mock_chmod, mock_copy):"},{"line_number":311,"context_line":"        test_path \u003d \u0027/path/of/file\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_9191be9c","line":308,"updated":"2018-03-01 15:35:09.000000000","message":"Why this test has the same name as test from L226? :)","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"40c22a633e1a6ecc0e8faa2588db8630dca47ff5","unresolved":false,"context_lines":[{"line_number":305,"context_line":"    @patch.object(IdentityCodec, \u0027serialize\u0027,"},{"line_number":306,"context_line":"                  return_value\u003d\u0027SerializedData\u0027)"},{"line_number":307,"context_line":"    @patch.object(operating_system, \u0027open\u0027, mock_open())"},{"line_number":308,"context_line":"    def test_write_file_with_flags_and_conv_func(self, mock_serialize,"},{"line_number":309,"context_line":"                                                 mock_deserialize,"},{"line_number":310,"context_line":"                                                 mock_chmod, mock_copy):"},{"line_number":311,"context_line":"        test_path \u003d \u0027/path/of/file\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_a4b7d4d8","line":308,"in_reply_to":"1f9dbf25_7ae402ad","updated":"2018-03-20 14:12:26.000000000","message":"OK, sorry for that, its correct.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":305,"context_line":"    @patch.object(IdentityCodec, \u0027serialize\u0027,"},{"line_number":306,"context_line":"                  return_value\u003d\u0027SerializedData\u0027)"},{"line_number":307,"context_line":"    @patch.object(operating_system, \u0027open\u0027, mock_open())"},{"line_number":308,"context_line":"    def test_write_file_with_flags_and_conv_func(self, mock_serialize,"},{"line_number":309,"context_line":"                                                 mock_deserialize,"},{"line_number":310,"context_line":"                                                 mock_chmod, mock_copy):"},{"line_number":311,"context_line":"        test_path \u003d \u0027/path/of/file\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_7ae402ad","line":308,"in_reply_to":"1f9dbf25_9191be9c","updated":"2018-03-02 01:58:11.000000000","message":"? This one is for write_file, so the function name begins with \"test_write_file\", the other one at L226 is for read_file, and the function name begins with \"test_read_file\". They are not \"same\". The remaining part after the prefix is same, telling the purpose the these two tests are the same, to ensure the file flag and converting function is corrected used.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"23ca00160f3b8c36a22aae67d7ed96f49316c321","unresolved":false,"context_lines":[{"line_number":305,"context_line":"    @patch.object(IdentityCodec, \u0027serialize\u0027,"},{"line_number":306,"context_line":"                  return_value\u003d\u0027SerializedData\u0027)"},{"line_number":307,"context_line":"    @patch.object(operating_system, \u0027open\u0027, mock_open())"},{"line_number":308,"context_line":"    def test_write_file_with_flags_and_conv_func(self, mock_serialize,"},{"line_number":309,"context_line":"                                                 mock_deserialize,"},{"line_number":310,"context_line":"                                                 mock_chmod, mock_copy):"},{"line_number":311,"context_line":"        test_path \u003d \u0027/path/of/file\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_55ad3699","line":308,"in_reply_to":"df7087c5_a4b7d4d8","updated":"2018-03-21 01:28:50.000000000","message":":), thanks for you patient reviewing.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        test_deserialize \u003d b\u0027DeseiralizedData\u0027"},{"line_number":315,"context_line":"        mock_file \u003d getattr(operating_system, \u0027open\u0027)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        # simple write"},{"line_number":318,"context_line":"        operating_system.write_file(test_path, test_data)"},{"line_number":319,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027w\u0027)"},{"line_number":320,"context_line":"        mock_serialize.called_once_with(test_data)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_11ccceba","line":317,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        test_deserialize \u003d b\u0027DeseiralizedData\u0027"},{"line_number":315,"context_line":"        mock_file \u003d getattr(operating_system, \u0027open\u0027)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        # simple write"},{"line_number":318,"context_line":"        operating_system.write_file(test_path, test_data)"},{"line_number":319,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027w\u0027)"},{"line_number":320,"context_line":"        mock_serialize.called_once_with(test_data)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_ba036a42","line":317,"in_reply_to":"1f9dbf25_11ccceba","updated":"2018-03-02 01:58:11.000000000","message":"See the comment about splitting tests in the above function \"test_read_file_with_flags_and_conv_func\".","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        mock_file.reset_mock()"},{"line_number":324,"context_line":"        mock_serialize.reset_mock()"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        # write with encode\u003dFalse"},{"line_number":327,"context_line":"        operating_system.write_file(test_path, test_data, encode\u003dFalse)"},{"line_number":328,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027wb\u0027)"},{"line_number":329,"context_line":"        mock_deserialize.called_once_with(test_data)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_31d1ca55","line":326,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        mock_file.reset_mock()"},{"line_number":324,"context_line":"        mock_serialize.reset_mock()"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        # write with encode\u003dFalse"},{"line_number":327,"context_line":"        operating_system.write_file(test_path, test_data, encode\u003dFalse)"},{"line_number":328,"context_line":"        mock_file.assert_called_once_with(test_path, \u0027wb\u0027)"},{"line_number":329,"context_line":"        mock_deserialize.called_once_with(test_data)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_7afde238","line":326,"in_reply_to":"1f9dbf25_31d1ca55","updated":"2018-03-02 01:58:11.000000000","message":"ditto.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        mock_deserialize.reset_mock()"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        # checking _write_file_as_root arguments"},{"line_number":336,"context_line":"        with patch.object(operating_system,"},{"line_number":337,"context_line":"                          \u0027_write_file_as_root\u0027) as mock_write_file_as_root:"},{"line_number":338,"context_line":"            # simple write as root,"},{"line_number":339,"context_line":"            operating_system.write_file(test_path, test_data, as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_d1c50690","line":336,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        mock_deserialize.reset_mock()"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        # checking _write_file_as_root arguments"},{"line_number":336,"context_line":"        with patch.object(operating_system,"},{"line_number":337,"context_line":"                          \u0027_write_file_as_root\u0027) as mock_write_file_as_root:"},{"line_number":338,"context_line":"            # simple write as root,"},{"line_number":339,"context_line":"            operating_system.write_file(test_path, test_data, as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_9afa2e40","line":336,"in_reply_to":"1f9dbf25_d1c50690","updated":"2018-03-02 01:58:11.000000000","message":"ditto.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            mock_deserialize.assert_not_called()"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # simple write as root"},{"line_number":353,"context_line":"        temp_file \u003d tempfile.NamedTemporaryFile(\u0027w\u0027)"},{"line_number":354,"context_line":"        with patch.object(tempfile, \u0027NamedTemporaryFile\u0027,"},{"line_number":355,"context_line":"                          return_value\u003dtemp_file) as mock_temp_file:"},{"line_number":356,"context_line":"            operating_system.write_file(test_path, test_data, as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_f1c28285","line":353,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            mock_deserialize.assert_not_called()"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # simple write as root"},{"line_number":353,"context_line":"        temp_file \u003d tempfile.NamedTemporaryFile(\u0027w\u0027)"},{"line_number":354,"context_line":"        with patch.object(tempfile, \u0027NamedTemporaryFile\u0027,"},{"line_number":355,"context_line":"                          return_value\u003dtemp_file) as mock_temp_file:"},{"line_number":356,"context_line":"            operating_system.write_file(test_path, test_data, as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_3a951ae5","line":353,"in_reply_to":"1f9dbf25_f1c28285","updated":"2018-03-02 01:58:11.000000000","message":"ditto.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"3a982fce4cd5d1a1a9456433b059d75ea39fe6c5","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        mock_chmod.reset_mock()"},{"line_number":364,"context_line":"        mock_serialize.reset_mock()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        # write as root with decode\u003dFalse"},{"line_number":367,"context_line":"        temp_file \u003d tempfile.NamedTemporaryFile(\u0027wb\u0027)"},{"line_number":368,"context_line":"        with patch.object(tempfile, \u0027NamedTemporaryFile\u0027,"},{"line_number":369,"context_line":"                          return_value\u003dtemp_file) as mock_temp_file:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_b1bcfa05","line":366,"updated":"2018-03-01 15:35:09.000000000","message":"I think it should be splitted to other test","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"d979daa1bfcb5c884915c0f29f4b78c14d358fe0","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        mock_chmod.reset_mock()"},{"line_number":364,"context_line":"        mock_serialize.reset_mock()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        # write as root with decode\u003dFalse"},{"line_number":367,"context_line":"        temp_file \u003d tempfile.NamedTemporaryFile(\u0027wb\u0027)"},{"line_number":368,"context_line":"        with patch.object(tempfile, \u0027NamedTemporaryFile\u0027,"},{"line_number":369,"context_line":"                          return_value\u003dtemp_file) as mock_temp_file:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_fa9ed205","line":366,"in_reply_to":"1f9dbf25_b1bcfa05","updated":"2018-03-02 01:58:11.000000000","message":"ditto.","commit_id":"8ce9d735d25d209a747b8f29c614236b74f95591"}]}
