)]}'
{"trove_dashboard/content/database_configurations/tests.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bdc896edfe2f5bbb42a02c9684219e6c0c8a72d9","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    import config_param_manager"},{"line_number":26,"context_line":"from trove_dashboard.test import helpers as test"},{"line_number":27,"context_line":"from trove_dashboard.test.helpers import IsA"},{"line_number":28,"context_line":"from trove_dashboard.test.helpers import IsHttpRequest"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"INDEX_URL \u003d reverse(\u0027horizon:project:database_configurations:index\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_ca374ee3","line":28,"updated":"2018-05-09 09:29:14.000000000","message":"Use module level import and import horizon.test.helpers directly.","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"cdd584c4b288f95c48a0606b2a90393459b13b35","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    import config_param_manager"},{"line_number":26,"context_line":"from trove_dashboard.test import helpers as test"},{"line_number":27,"context_line":"from trove_dashboard.test.helpers import IsA"},{"line_number":28,"context_line":"from trove_dashboard.test.helpers import IsHttpRequest"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"INDEX_URL \u003d reverse(\u0027horizon:project:database_configurations:index\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_6d4bb458","line":28,"in_reply_to":"5f7c97a3_ca374ee3","updated":"2018-05-09 10:26:23.000000000","message":"Thanks, the rule of module level importing is in the OpenStack stype guide, I\u0027ll fix this in the next version.\n\nCould you explain more about import horizon.test.helper directly? It could be simple and clean to export these objects in the trove_dashboard.test.helpers, otherwise we\u0027ll mix the usage of openstack_dashboard.test.helpers, horizon.test.helpers and the trove_dashboard one. Thanks.","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bdc896edfe2f5bbb42a02c9684219e6c0c8a72d9","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.mock_configuration_list.return_value \u003d ("},{"line_number":41,"context_line":"            self.database_configurations.list())"},{"line_number":42,"context_line":"        res \u003d self.client.get(INDEX_URL)"},{"line_number":43,"context_line":"        self.mock_configuration_list.assert_called_once_with(IsHttpRequest())"},{"line_number":44,"context_line":"        self.assertTemplateUsed(res,"},{"line_number":45,"context_line":"                                \u0027project/database_configurations/index.html\u0027)"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_8a3156ef","line":43,"range":{"start_line":43,"start_character":61,"end_line":43,"end_character":76},"updated":"2018-05-09 09:29:14.000000000","message":"-\u003e test.IsHttpRequest()","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"cdd584c4b288f95c48a0606b2a90393459b13b35","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.mock_configuration_list.return_value \u003d ("},{"line_number":41,"context_line":"            self.database_configurations.list())"},{"line_number":42,"context_line":"        res \u003d self.client.get(INDEX_URL)"},{"line_number":43,"context_line":"        self.mock_configuration_list.assert_called_once_with(IsHttpRequest())"},{"line_number":44,"context_line":"        self.assertTemplateUsed(res,"},{"line_number":45,"context_line":"                                \u0027project/database_configurations/index.html\u0027)"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_0da9e0dd","line":43,"range":{"start_line":43,"start_character":61,"end_line":43,"end_character":76},"in_reply_to":"5f7c97a3_8a3156ef","updated":"2018-05-09 10:26:23.000000000","message":"Thanks, will fix this later.","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bdc896edfe2f5bbb42a02c9684219e6c0c8a72d9","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.mock_datastore_list.assert_called_once_with(IsHttpRequest())"},{"line_number":65,"context_line":"        self.assert_mock_multiple_calls_with_same_arguments("},{"line_number":66,"context_line":"            self.mock_datastore_version_list, 4,"},{"line_number":67,"context_line":"            mock.call(IsHttpRequest(), IsA(str)))"},{"line_number":68,"context_line":"        self.assertTemplateUsed(res,"},{"line_number":69,"context_line":"                                \u0027project/database_configurations/create.html\u0027)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_ea57aa01","line":67,"range":{"start_line":67,"start_character":39,"end_line":67,"end_character":42},"updated":"2018-05-09 09:29:14.000000000","message":"-\u003e test.IsA","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"cdd584c4b288f95c48a0606b2a90393459b13b35","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.mock_datastore_list.assert_called_once_with(IsHttpRequest())"},{"line_number":65,"context_line":"        self.assert_mock_multiple_calls_with_same_arguments("},{"line_number":66,"context_line":"            self.mock_datastore_version_list, 4,"},{"line_number":67,"context_line":"            mock.call(IsHttpRequest(), IsA(str)))"},{"line_number":68,"context_line":"        self.assertTemplateUsed(res,"},{"line_number":69,"context_line":"                                \u0027project/database_configurations/create.html\u0027)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_cdaa08d1","line":67,"range":{"start_line":67,"start_character":39,"end_line":67,"end_character":42},"in_reply_to":"5f7c97a3_ea57aa01","updated":"2018-05-09 10:26:23.000000000","message":"Thanks, will fix this later.","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d24ad29bc7e856be0a11a03754c950126b48f285","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        api.trove: (\u0027configuration_parameters_list\u0027,),"},{"line_number":204,"context_line":"        config_param_manager.ConfigParamManager:"},{"line_number":205,"context_line":"            (\u0027get_configuration\u0027, \u0027configuration_get\u0027,)})"},{"line_number":206,"context_line":"    @mock.patch.object(api.trove, \u0027configuration_get\u0027, mock.Mock())"},{"line_number":207,"context_line":"    def test_add_parameter(self):"},{"line_number":208,"context_line":"        config \u003d self.database_configurations.first()"},{"line_number":209,"context_line":"        self.mock_get_configuration.return_value \u003d config"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_0e1ed173","line":206,"updated":"2018-06-06 20:53:53.000000000","message":"This looks a bit tricky. Why don\u0027t you mock api.trove.configuration_get in a same way as for other methods? In addition, it is better to check configuration_get using assert_xxxx.","commit_id":"5088f83ec78a5b32fa90ed55a966f1cdad8288cd"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"9c343f74e1970cd59ae2b48c37f3ec6382bd20a9","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        api.trove: (\u0027configuration_parameters_list\u0027,),"},{"line_number":204,"context_line":"        config_param_manager.ConfigParamManager:"},{"line_number":205,"context_line":"            (\u0027get_configuration\u0027, \u0027configuration_get\u0027,)})"},{"line_number":206,"context_line":"    @mock.patch.object(api.trove, \u0027configuration_get\u0027, mock.Mock())"},{"line_number":207,"context_line":"    def test_add_parameter(self):"},{"line_number":208,"context_line":"        config \u003d self.database_configurations.first()"},{"line_number":209,"context_line":"        self.mock_get_configuration.return_value \u003d config"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_8a02c4b9","line":206,"in_reply_to":"5f7c97a3_0e1ed173","updated":"2018-06-19 14:22:45.000000000","message":"This line was added to fix the duplications of \u0027configuration_get\u0027 in api.trove and config_param_manager.ConfigParamManager, I realized that it\u0027s useless, as api.trove.configuration_get is called by the later one which is already mocked, so I just removed this line(and the other two for the same purpose).\n\nThanks for pointing this out.","commit_id":"5088f83ec78a5b32fa90ed55a966f1cdad8288cd"}],"trove_dashboard/test/helpers.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"bdc896edfe2f5bbb42a02c9684219e6c0c8a72d9","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from trove_dashboard.test.test_data import utils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Shortcuts to avoid importing openstack_dashboard.test.helper and for"},{"line_number":23,"context_line":"# backward compatibility."},{"line_number":24,"context_line":"create_mocks \u003d helpers.create_mocks"},{"line_number":25,"context_line":"IsA \u003d helpers.IsA"},{"line_number":26,"context_line":"IsHttpRequest \u003d helpers.IsHttpRequest"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def create_stubs(stubs_to_create\u003d{}):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_6a1dda64","line":26,"range":{"start_line":22,"start_character":0,"end_line":26,"end_character":37},"updated":"2018-05-09 09:29:14.000000000","message":"This is unnecessary.\n\nThe above comment is valid only in openstack_dashboard.test.helpers.\n\nThe suggested way is to consume horizon.test.helpers in your tests directly.","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"9cfefa83e551f4cb030a7b27c494e8ff645f6861","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from trove_dashboard.test.test_data import utils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Shortcuts to avoid importing openstack_dashboard.test.helper and for"},{"line_number":23,"context_line":"# backward compatibility."},{"line_number":24,"context_line":"create_mocks \u003d helpers.create_mocks"},{"line_number":25,"context_line":"IsA \u003d helpers.IsA"},{"line_number":26,"context_line":"IsHttpRequest \u003d helpers.IsHttpRequest"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def create_stubs(stubs_to_create\u003d{}):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_2fcb6b1e","line":26,"range":{"start_line":22,"start_character":0,"end_line":26,"end_character":37},"in_reply_to":"5f7c97a3_1ebca867","updated":"2018-05-09 15:12:23.000000000","message":"Ah.... I forgot that create_mocks is not moved to horizon.test.helpers yet... thanks for reminding it. I thought we need to move it from openstack_dashboard to horizon, but it is partial and create_mocks is not moved yet :(\n\nI am now fine to have shortcuts here once you update the comment. Thanks!","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"63375ff871ec236551da7afe898fe25fe5dbc84e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from trove_dashboard.test.test_data import utils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Shortcuts to avoid importing openstack_dashboard.test.helper and for"},{"line_number":23,"context_line":"# backward compatibility."},{"line_number":24,"context_line":"create_mocks \u003d helpers.create_mocks"},{"line_number":25,"context_line":"IsA \u003d helpers.IsA"},{"line_number":26,"context_line":"IsHttpRequest \u003d helpers.IsHttpRequest"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def create_stubs(stubs_to_create\u003d{}):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_3366c453","line":26,"range":{"start_line":22,"start_character":0,"end_line":26,"end_character":37},"in_reply_to":"5f7c97a3_2fcb6b1e","updated":"2018-05-18 08:18:29.000000000","message":"Thanks, Akihiro, and sorry for the late response, I\u0027ll update these patches asap.","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"cdd584c4b288f95c48a0606b2a90393459b13b35","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from trove_dashboard.test.test_data import utils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Shortcuts to avoid importing openstack_dashboard.test.helper and for"},{"line_number":23,"context_line":"# backward compatibility."},{"line_number":24,"context_line":"create_mocks \u003d helpers.create_mocks"},{"line_number":25,"context_line":"IsA \u003d helpers.IsA"},{"line_number":26,"context_line":"IsHttpRequest \u003d helpers.IsHttpRequest"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def create_stubs(stubs_to_create\u003d{}):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_8de2d02e","line":26,"range":{"start_line":22,"start_character":0,"end_line":26,"end_character":37},"in_reply_to":"5f7c97a3_6a1dda64","updated":"2018-05-09 10:26:23.000000000","message":"This is like the below \"create_stubs\", with these shortcuts we could make the lines using the helpers in the tests consistent(all imported from trove_dashboard.test.helper).\n\nI\u0027ll reponse to the similar comment in the file of DatabaseConfigurationsTests, would you kind explain more about this, thanks.","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"36b0c697e5bc146d326aa532ace3ef6abeeb790a","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from trove_dashboard.test.test_data import utils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Shortcuts to avoid importing openstack_dashboard.test.helper and for"},{"line_number":23,"context_line":"# backward compatibility."},{"line_number":24,"context_line":"create_mocks \u003d helpers.create_mocks"},{"line_number":25,"context_line":"IsA \u003d helpers.IsA"},{"line_number":26,"context_line":"IsHttpRequest \u003d helpers.IsHttpRequest"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def create_stubs(stubs_to_create\u003d{}):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_fe220ca4","line":26,"range":{"start_line":22,"start_character":0,"end_line":26,"end_character":37},"in_reply_to":"5f7c97a3_8de2d02e","updated":"2018-05-09 12:27:40.000000000","message":"[long-term reply]\nGenerally speaking, horizon.test.helpers is the thing that horizon plugins should use. openstack_dashboard.test.helpers is not intended to use in horizon plugins and it is expected to be used in openstack_dashboard testing. Perhaps we are in the middle way but we would like to keep compatibility only in horizon.test.helpers (as library point of view of horizon).\n\n[very specific reason of -1]\nthe comment at L.22 is not correct. it says \"for backward compatibility\", but it is a new thing, so I don\u0027t understand what is \"backward compatibility\". it seems you would like to say \"follow the existing convention\".","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"},{"author":{"_account_id":13157,"name":"Zhao Chao","email":"zhaochao1984@gmail.com","username":"zhaochao"},"change_message_id":"310b70f5cfccc99e849b26d08a5cfc0ac49de3ab","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from trove_dashboard.test.test_data import utils"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Shortcuts to avoid importing openstack_dashboard.test.helper and for"},{"line_number":23,"context_line":"# backward compatibility."},{"line_number":24,"context_line":"create_mocks \u003d helpers.create_mocks"},{"line_number":25,"context_line":"IsA \u003d helpers.IsA"},{"line_number":26,"context_line":"IsHttpRequest \u003d helpers.IsHttpRequest"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def create_stubs(stubs_to_create\u003d{}):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_1ebca867","line":26,"range":{"start_line":22,"start_character":0,"end_line":26,"end_character":37},"in_reply_to":"5f7c97a3_fe220ca4","updated":"2018-05-09 13:11:42.000000000","message":"Thanks for detailed explanation, I got the point about using horizon.test.helpers in horizon plugins. However the \"create_stubs\" and \"create_mocks\" is really helpful for plugins, so it may be better move these helpers to horizon.test.helpers. Do we have any plan about this?\n\nYou\u0027re right about the comment at L.22, I was doing a simple copy and modfication from horizon, my fault, :(. I think it\u0027s still useful for these shortcuts, so I\u0027m going to keep them and   the first part the the comment, and add a todo to state that we should migrate to horion.test.helpers in the future. Do you think this is appropriate?","commit_id":"43792151632ef8abd386e699ddb4b4e90aa4b7f8"}]}
