)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"57a252d1119d13c2420141272fb5f772a0d497cd","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Pavel Boldin \u003cpboldin@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-07 03:14:58 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix mock usage in tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I8366736f3bc7088f867eec1fc72630dbe1bcf19e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3afb71cf_3ee80f10","line":7,"updated":"2015-06-08 08:58:24.000000000","message":"Need more details for commit message.","commit_id":"7fc57b055a736d12366dadb304a1f767b4445e4f"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"57a252d1119d13c2420141272fb5f772a0d497cd","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix mock usage in tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I8366736f3bc7088f867eec1fc72630dbe1bcf19e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3afb71cf_ded33b5e","line":9,"updated":"2015-06-08 08:58:24.000000000","message":"Is there a bug in launchpad for it?","commit_id":"7fc57b055a736d12366dadb304a1f767b4445e4f"}],"tests/unit/cli/commands/test_deployment.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"52f170fd10781d9f9b4248b34e2ffad2cc33cc42","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    @mock.patch(\"rally.cli.commands.deployment.DeploymentCommands.list\")"},{"line_number":36,"context_line":"    @mock.patch(\"rally.cli.commands.deployment.api.Deployment.create\")"},{"line_number":37,"context_line":"    @mock.patch(\"rally.cli.commands.deployment.open\","},{"line_number":38,"context_line":"                side_effect\u003dmock.mock_open(read_data\u003d\"{\\\"some\\\": \\\"json\\\"}\"),"},{"line_number":39,"context_line":"                create\u003dTrue)"},{"line_number":40,"context_line":"    def test_create(self, mock_open, mock_deployment_create,"},{"line_number":41,"context_line":"                    mock_deployment_commands_list):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_37749b66","line":38,"updated":"2015-06-08 17:46:00.000000000","message":"Why do you change mock_open to the side-effect? The examples (http://www.voidspace.org.uk/python/mock/helpers.html#mock-open) use the mock_open() result as the new object itself, not as the side-effect, and there\u0027s nothing obvious in the DeploymentCommands.create() code to suggest why it would be necessary to use a side-effect here.","commit_id":"fc3cda45af6a68e455d87a870d15c62d38b69253"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"c24e5e9297602cac92eef05602d01c133a92e81c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    @mock.patch(\"rally.cli.commands.deployment.DeploymentCommands.list\")"},{"line_number":36,"context_line":"    @mock.patch(\"rally.cli.commands.deployment.api.Deployment.create\")"},{"line_number":37,"context_line":"    @mock.patch(\"rally.cli.commands.deployment.open\","},{"line_number":38,"context_line":"                side_effect\u003dmock.mock_open(read_data\u003d\"{\\\"some\\\": \\\"json\\\"}\"),"},{"line_number":39,"context_line":"                create\u003dTrue)"},{"line_number":40,"context_line":"    def test_create(self, mock_open, mock_deployment_create,"},{"line_number":41,"context_line":"                    mock_deployment_commands_list):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_173cff2d","line":38,"in_reply_to":"3afb71cf_37749b66","updated":"2015-06-08 17:53:02.000000000","message":"Simply because putting it that way won\u0027t add an argument to the test function making it impossible to check if it was called.","commit_id":"fc3cda45af6a68e455d87a870d15c62d38b69253"}],"tests/unit/deploy/engines/test_fuel.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"52f170fd10781d9f9b4248b34e2ffad2cc33cc42","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                \"get_endpoint_ip.return_value\": \"2.3.4.5\","},{"line_number":97,"context_line":"                \"get_attributes.return_value\": attributes"},{"line_number":98,"context_line":"            }"},{"line_number":99,"context_line":"        )"},{"line_number":100,"context_line":"        mock_fuel_client.return_value \u003d client"},{"line_number":101,"context_line":"        mock_fuel_cluster.return_value \u003d cluster"},{"line_number":102,"context_line":"        self.deployment.add_resource \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_572a772d","line":99,"updated":"2015-06-08 17:46:00.000000000","message":"This is a little crazy, very cool, and (unfortunately) deeply unintuitive. I\u0027d suggest keeping it simple:\n\n    cluster \u003d mock.Mock(\n        cluster\u003d{\"id\": 42},\n        get_endpoint_ip\u003dmock.Mock(return_value\u003d\"2.3.4.5\"),\n        get_attributes\u003dmock.Mock(return_value\u003dattributes))","commit_id":"fc3cda45af6a68e455d87a870d15c62d38b69253"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"c24e5e9297602cac92eef05602d01c133a92e81c","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                \"get_endpoint_ip.return_value\": \"2.3.4.5\","},{"line_number":97,"context_line":"                \"get_attributes.return_value\": attributes"},{"line_number":98,"context_line":"            }"},{"line_number":99,"context_line":"        )"},{"line_number":100,"context_line":"        mock_fuel_client.return_value \u003d client"},{"line_number":101,"context_line":"        mock_fuel_cluster.return_value \u003d cluster"},{"line_number":102,"context_line":"        self.deployment.add_resource \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_57d5d7b6","line":99,"in_reply_to":"3afb71cf_572a772d","updated":"2015-06-08 17:53:02.000000000","message":"I agree, but please take a look here:\nhttp://www.voidspace.org.uk/python/mock/patch.html#patch\n\nI really thing we should teach people about these possibilities. Yet they really are not so intuitive (but nothing in software development really is)","commit_id":"fc3cda45af6a68e455d87a870d15c62d38b69253"}],"tests/unit/verification/test_json2html.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"4dfb79b8dfa062405085ed427266499a0996c89d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        self.assertEqual(["},{"line_number":103,"context_line":"            mock.call(\"verification/report.mako\"),"},{"line_number":104,"context_line":"            mock.call().render(report\u003d\"report_data\")"},{"line_number":105,"context_line":"        ], mock_get_template.mock_calls)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_e36ab3ec","line":105,"updated":"2015-06-17 20:47:54.000000000","message":"The original obviously had problems, but I don\u0027t think this is a ton more readable -- maybe even less. What about:\n\n    mock_get.assert_called_once_with(\"verification/report.mako\")\n    mock_get.return_value.render.assert_called_once_with(report\u003d\"report_data\")\n\nThat neither uses deep mock magic, nor does it abuse the ability to call mocks in the test case.","commit_id":"f3dd2f2d7d36716b6d01a170e5860cb5c5ae6ce8"}],"tests/unit/verification/test_tempest.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"4dfb79b8dfa062405085ed427266499a0996c89d","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            ["},{"line_number":349,"context_line":"                mock.call(self.verifier.deployment),"},{"line_number":350,"context_line":"                mock.call().generate(self.verifier.config_file)"},{"line_number":351,"context_line":"            ], mock_tempest_conf.mock_calls)"},{"line_number":352,"context_line":"        self.verifier.verification.start_verifying.assert_called_once_with("},{"line_number":353,"context_line":"            set_name)"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_837c07b6","line":351,"updated":"2015-06-17 20:47:54.000000000","message":"Same here.","commit_id":"f3dd2f2d7d36716b6d01a170e5860cb5c5ae6ce8"}]}
