)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ebccdff134f0651d40125e592972fd743b14aed1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     felix23ma \u003cfelix23ma@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-16 13:45:36 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use _get_driver as utils.require_driver_initialized parameter in create_backup and restore_backup"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"backend is already known so don’t need to use the default backend name"},{"line_number":10,"context_line":"to check if the driver is initialized. See details in Bug 1515900."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba8a016a_45b6c83e","line":7,"updated":"2015-11-16 11:23:03.000000000","message":"Please, make commit title shorter","commit_id":"5ab31671135f0ccab07f343265985007857888e3"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"1f9ab9526f177899ef440852c49907b0db29946d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Felix Ma \u003cfelix23ma@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-16 13:42:22 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix utils.require_driver_initialized issue in create_backup/restore_backup"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Backend is already known so don’t need to use the default backend name"},{"line_number":10,"context_line":"to check if the driver is initialized. See details in Bug 1515900."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba8a016a_82b6dc3b","line":7,"updated":"2015-11-16 14:24:52.000000000","message":"Commit message summaries should be kept to 50 chars.\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"91507e6d86acdd7ee213756be9497a92707435fe"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"1f9ab9526f177899ef440852c49907b0db29946d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix utils.require_driver_initialized issue in create_backup/restore_backup"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Backend is already known so don’t need to use the default backend name"},{"line_number":10,"context_line":"to check if the driver is initialized. See details in Bug 1515900."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I797c75ca0eff574e3eb20dfedc8d5b64ca06a06a"},{"line_number":13,"context_line":"Closes-Bug: #1515900"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba8a016a_c2ace4ef","line":10,"updated":"2015-11-16 14:24:52.000000000","message":"Don\u0027t need this last sentence since you reference the bug at the end of the commit message. Thanks!","commit_id":"91507e6d86acdd7ee213756be9497a92707435fe"}],"cinder/backup/manager.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"02f7627eeb3c61e2c9fc4554a0db48228d75a25c","unresolved":false,"context_lines":[{"line_number":480,"context_line":"            # NOTE(flaper87): Verify the driver is enabled"},{"line_number":481,"context_line":"            # before going forward. The exception will be caught,"},{"line_number":482,"context_line":"            # the volume status will be set back to available and"},{"line_number":483,"context_line":"            # the backup status to \u0027error\u0027"},{"line_number":484,"context_line":"            utils.require_driver_initialized(self.driver)"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"            backup_service \u003d self.service.get_backup_driver(context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_0abdd4d6","line":483,"updated":"2015-11-16 03:23:32.000000000","message":"Can you change here too?","commit_id":"655add734849300bb8dbbf615b123f9eaacba3e9"}],"cinder/tests/unit/test_backup.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"ebccdff134f0651d40125e592972fd743b14aed1","unresolved":false,"context_lines":[{"line_number":543,"context_line":""},{"line_number":544,"context_line":"        self.backup_mgr._get_driver \u003d mock.MagicMock()"},{"line_number":545,"context_line":"        self.backup_mgr.create_backup(self.ctxt, backup)"},{"line_number":546,"context_line":"        self.assertEqual(2, self.backup_mgr._get_driver.call_count)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    def test_restore_backup_with_bad_volume_status(self):"},{"line_number":549,"context_line":"        \"\"\"Test error handling."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_65c42c92","line":546,"updated":"2015-11-16 11:23:03.000000000","message":"Why it should be called twice?","commit_id":"5ab31671135f0ccab07f343265985007857888e3"},{"author":{"_account_id":17527,"name":"Felix Ma","email":"maqi@cmss.chinamobile.com","username":"felix23ma"},"change_message_id":"16412e06af365eac6fae3419097fd4ffb08e6ced","unresolved":false,"context_lines":[{"line_number":543,"context_line":""},{"line_number":544,"context_line":"        self.backup_mgr._get_driver \u003d mock.MagicMock()"},{"line_number":545,"context_line":"        self.backup_mgr.create_backup(self.ctxt, backup)"},{"line_number":546,"context_line":"        self.assertEqual(2, self.backup_mgr._get_driver.call_count)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    def test_restore_backup_with_bad_volume_status(self):"},{"line_number":549,"context_line":"        \"\"\"Test error handling."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_e6801f49","line":546,"in_reply_to":"ba8a016a_65c42c92","updated":"2015-11-16 13:33:37.000000000","message":"Besides utils.require_driver_initialized, create_backup will call self._get_driver once again.","commit_id":"5ab31671135f0ccab07f343265985007857888e3"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"52bd21023a83c823efe2077c187832f9ad954397","unresolved":false,"context_lines":[{"line_number":543,"context_line":""},{"line_number":544,"context_line":"        self.backup_mgr._get_driver \u003d mock.MagicMock()"},{"line_number":545,"context_line":"        self.backup_mgr.create_backup(self.ctxt, backup)"},{"line_number":546,"context_line":"        self.assertEqual(2, self.backup_mgr._get_driver.call_count)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    def test_restore_backup_with_bad_volume_status(self):"},{"line_number":549,"context_line":"        \"\"\"Test error handling."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_f613e60b","line":546,"updated":"2015-11-16 15:25:52.000000000","message":"-1: You should check that one call is with None and the other with the backend.  As the test is now it will pass even without the code changes.","commit_id":"64c535053029f325e027d1635fd48041acfaf2d4"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d310ab11eb9655306ccb37c207a9b14ea6b42182","unresolved":false,"context_lines":[{"line_number":543,"context_line":""},{"line_number":544,"context_line":"        self.backup_mgr._get_driver \u003d mock.MagicMock()"},{"line_number":545,"context_line":"        self.backup_mgr.create_backup(self.ctxt, backup)"},{"line_number":546,"context_line":"        self.assertEqual(2, self.backup_mgr._get_driver.call_count)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    def test_restore_backup_with_bad_volume_status(self):"},{"line_number":549,"context_line":"        \"\"\"Test error handling."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_f8b50c7e","line":546,"in_reply_to":"ba8a016a_51dbdc1b","updated":"2015-11-16 18:05:29.000000000","message":"Half of what I said was right, and half was gibberish.  But you still have to check that both calls pass backend to the method and called_with only checks last call, so it would still pass with the original code.\n\nYou can use `call_args_list` and compare it to a list of mock.call items to check that both calls are passing the same arguments. Or you can do:\n\n self.backup_mgr._get_driver.assert_called_with(backend)\n self.assertEqual(self.backup_mgr._get_driver.call_args_list[0], self.backup_mgr._get_driver.call_Args_list[1])\n\nThat should also work.","commit_id":"64c535053029f325e027d1635fd48041acfaf2d4"},{"author":{"_account_id":17527,"name":"Felix Ma","email":"maqi@cmss.chinamobile.com","username":"felix23ma"},"change_message_id":"023bcd3a471348df9864b0021581220fa688e77e","unresolved":false,"context_lines":[{"line_number":543,"context_line":""},{"line_number":544,"context_line":"        self.backup_mgr._get_driver \u003d mock.MagicMock()"},{"line_number":545,"context_line":"        self.backup_mgr.create_backup(self.ctxt, backup)"},{"line_number":546,"context_line":"        self.assertEqual(2, self.backup_mgr._get_driver.call_count)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    def test_restore_backup_with_bad_volume_status(self):"},{"line_number":549,"context_line":"        \"\"\"Test error handling."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_51dbdc1b","line":546,"in_reply_to":"ba8a016a_f613e60b","updated":"2015-11-16 15:46:21.000000000","message":"Gorka, thanks for your comments.\nBoth calls are with backend. What do you mean once with None?  I would like to modify the assert ad below:\n\nself.backup_mgr._get_driver \u003d mock.MagicMock()\n\nbackend \u003d mock.MagicMock()\n\nself.backup_mgr.create_backup(self.ctxt, backup)\n\nself.assertEqual(2, self.backup_mgr._get_driver.call_count)\n\nself.assertTrue(self.backup_mgr._get_driver.called_with(backend))\n\nIs it OK?","commit_id":"64c535053029f325e027d1635fd48041acfaf2d4"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"52bd21023a83c823efe2077c187832f9ad954397","unresolved":false,"context_lines":[{"line_number":667,"context_line":""},{"line_number":668,"context_line":"        self.backup_mgr._get_driver \u003d mock.MagicMock()"},{"line_number":669,"context_line":"        self.backup_mgr.restore_backup(self.ctxt, backup, vol_id)"},{"line_number":670,"context_line":"        self.assertEqual(2, self.backup_mgr._get_driver.call_count)"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"    def test_delete_backup_with_bad_backup_status(self):"},{"line_number":673,"context_line":"        \"\"\"Test error handling."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_b6e47e0d","line":670,"updated":"2015-11-16 15:25:52.000000000","message":"-1: Same as above.","commit_id":"64c535053029f325e027d1635fd48041acfaf2d4"}]}
