)]}'
{"neutronclient/tests/unit/test_cli20.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"560033344700d14840336e916ef41a25db0f0152","unresolved":false,"context_lines":[{"line_number":589,"context_line":"        _str \u003d self.fake_stdout.make_string()"},{"line_number":590,"context_line":"        self.assertIn(myid, _str)"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":"    def _assert_mock_multiple_calls_with_same_arguments("},{"line_number":593,"context_line":"            self, mocked_method, count, expected_call):"},{"line_number":594,"context_line":"        self.assertEqual(count, mocked_method.call_count)"},{"line_number":595,"context_line":"        mocked_method.assert_has_calls([expected_call] * count)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_692028ad","line":592,"range":{"start_line":592,"start_character":7,"end_line":592,"end_character":9},"updated":"2018-03-15 08:41:58.000000000","message":"question: Is there any reason you start the method name with underscore?","commit_id":"f2abd8ce1645984ab5a2f5f267527fb3b386814b"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"c0f5e365772bca5a0c3146b06c38263af8cb7cda","unresolved":false,"context_lines":[{"line_number":589,"context_line":"        _str \u003d self.fake_stdout.make_string()"},{"line_number":590,"context_line":"        self.assertIn(myid, _str)"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":"    def _assert_mock_multiple_calls_with_same_arguments("},{"line_number":593,"context_line":"            self, mocked_method, count, expected_call):"},{"line_number":594,"context_line":"        self.assertEqual(count, mocked_method.call_count)"},{"line_number":595,"context_line":"        mocked_method.assert_has_calls([expected_call] * count)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_da99cac3","line":592,"range":{"start_line":592,"start_character":7,"end_line":592,"end_character":9},"in_reply_to":"df7087c5_567b6e26","updated":"2018-03-16 15:08:36.000000000","message":"I see.","commit_id":"f2abd8ce1645984ab5a2f5f267527fb3b386814b"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"6ca2b6684d7a137b7bd1cf0ccb90241e259a1388","unresolved":false,"context_lines":[{"line_number":589,"context_line":"        _str \u003d self.fake_stdout.make_string()"},{"line_number":590,"context_line":"        self.assertIn(myid, _str)"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":"    def _assert_mock_multiple_calls_with_same_arguments("},{"line_number":593,"context_line":"            self, mocked_method, count, expected_call):"},{"line_number":594,"context_line":"        self.assertEqual(count, mocked_method.call_count)"},{"line_number":595,"context_line":"        mocked_method.assert_has_calls([expected_call] * count)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_88800cf7","line":592,"range":{"start_line":592,"start_character":7,"end_line":592,"end_character":9},"in_reply_to":"df7087c5_692028ad","updated":"2018-03-15 14:10:39.000000000","message":"I tried to follow the convention that private methods start with underscore but I can remove it if you want.","commit_id":"f2abd8ce1645984ab5a2f5f267527fb3b386814b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"1053ac7d5172049f58addaebebab7d5ea020964b","unresolved":false,"context_lines":[{"line_number":589,"context_line":"        _str \u003d self.fake_stdout.make_string()"},{"line_number":590,"context_line":"        self.assertIn(myid, _str)"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":"    def _assert_mock_multiple_calls_with_same_arguments("},{"line_number":593,"context_line":"            self, mocked_method, count, expected_call):"},{"line_number":594,"context_line":"        self.assertEqual(count, mocked_method.call_count)"},{"line_number":595,"context_line":"        mocked_method.assert_has_calls([expected_call] * count)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_567b6e26","line":592,"range":{"start_line":592,"start_character":7,"end_line":592,"end_character":9},"in_reply_to":"df7087c5_88800cf7","updated":"2018-03-15 21:19:55.000000000","message":"Precisely there are three types of methods: public, protected and private. In general, private methods are used only inside a class. In this case, it is intended to be consumed by child test classes, so I think there is no need to start with underscore.\n\nOn the other hand, I noticed the convention of this class is a bit different. Utility methods like _test_create_resource are prefixed with underscore.\n\nAs my conclusion, I am okay with either in this case.","commit_id":"f2abd8ce1645984ab5a2f5f267527fb3b386814b"}],"neutronclient/tests/unit/test_cli20_port.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"68fac3295958ff12be2d6b498ad608cc3e4f656c","unresolved":false,"context_lines":[{"line_number":507,"context_line":"            cmd_parser \u003d cmd.get_parser(\"list_\" + resources)"},{"line_number":508,"context_line":"            shell.run_command(cmd, cmd_parser, args)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        mock_get_client.assert_called_with()"},{"line_number":511,"context_line":"        mock_request.assert_called_once_with("},{"line_number":512,"context_line":"            test_cli20.MyUrlComparator("},{"line_number":513,"context_line":"                test_cli20.end_url(path, query % myid), self.client),"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_1968f984","line":510,"updated":"2018-03-14 11:53:12.000000000","message":"shouldn\u0027t be assert_called_once_with()? Is it called more than once?","commit_id":"f1829190a106dbab347eb7d6a128963730c771f9"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"d35ed5ff9477283f3de8f99bd8e20387d8ee21e9","unresolved":false,"context_lines":[{"line_number":507,"context_line":"            cmd_parser \u003d cmd.get_parser(\"list_\" + resources)"},{"line_number":508,"context_line":"            shell.run_command(cmd, cmd_parser, args)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        mock_get_client.assert_called_with()"},{"line_number":511,"context_line":"        mock_request.assert_called_once_with("},{"line_number":512,"context_line":"            test_cli20.MyUrlComparator("},{"line_number":513,"context_line":"                test_cli20.end_url(path, query % myid), self.client),"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_b186b8b8","line":510,"in_reply_to":"df7087c5_1968f984","updated":"2018-03-14 21:06:51.000000000","message":"It is called more than once.","commit_id":"f1829190a106dbab347eb7d6a128963730c771f9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d0e779af9245c0edab730f245c47e18b4b351bff","unresolved":false,"context_lines":[{"line_number":507,"context_line":"            cmd_parser \u003d cmd.get_parser(\"list_\" + resources)"},{"line_number":508,"context_line":"            shell.run_command(cmd, cmd_parser, args)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        mock_get_client.assert_called_with()"},{"line_number":511,"context_line":"        mock_request.assert_called_once_with("},{"line_number":512,"context_line":"            test_cli20.MyUrlComparator("},{"line_number":513,"context_line":"                test_cli20.end_url(path, query % myid), self.client),"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_f115104a","line":510,"in_reply_to":"df7087c5_b186b8b8","updated":"2018-03-14 21:09:20.000000000","message":"ok, thx","commit_id":"f1829190a106dbab347eb7d6a128963730c771f9"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"31a2dcd9eee4f395ad87f942cbceae360a5b2bc7","unresolved":false,"context_lines":[{"line_number":507,"context_line":"            cmd_parser \u003d cmd.get_parser(\"list_\" + resources)"},{"line_number":508,"context_line":"            shell.run_command(cmd, cmd_parser, args)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        mock_get_client.assert_called_with()"},{"line_number":511,"context_line":"        mock_request.assert_called_once_with("},{"line_number":512,"context_line":"            test_cli20.MyUrlComparator("},{"line_number":513,"context_line":"                test_cli20.end_url(path, query % myid), self.client),"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_978b64c1","line":510,"in_reply_to":"df7087c5_d7079c17","updated":"2018-03-14 22:57:46.000000000","message":"Done","commit_id":"f1829190a106dbab347eb7d6a128963730c771f9"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8b74167f80435348e20bc2a604302f2ae2de6073","unresolved":false,"context_lines":[{"line_number":507,"context_line":"            cmd_parser \u003d cmd.get_parser(\"list_\" + resources)"},{"line_number":508,"context_line":"            shell.run_command(cmd, cmd_parser, args)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        mock_get_client.assert_called_with()"},{"line_number":511,"context_line":"        mock_request.assert_called_once_with("},{"line_number":512,"context_line":"            test_cli20.MyUrlComparator("},{"line_number":513,"context_line":"                test_cli20.end_url(path, query % myid), self.client),"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_d7079c17","line":510,"in_reply_to":"df7087c5_f115104a","updated":"2018-03-14 22:02:05.000000000","message":"If it is called multiple time, hopefully we check call_count and all called arguments. assert_called_with() just checks the last call of a mocked method. http://paste.openstack.org/show/700999/\n\nhorizon team introduced a convenient helper method [1]. I am not sure we would like to introduce similar helper method, but at least we would like to check similar things.\n\n[1] https://github.com/openstack/horizon/blob/master/openstack_dashboard/test/helpers.py#L450-L453","commit_id":"f1829190a106dbab347eb7d6a128963730c771f9"}]}
