)]}'
{"openstack_dashboard/dashboards/admin/volumes/tests.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f0a4053460dd942f4460f5ae8a9ff23e6abccb24","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        res \u003d self.client.get(INDEX_URL)"},{"line_number":66,"context_line":"        if not instanceless_volumes:"},{"line_number":67,"context_line":"            mock_server_list.assert_called_with("},{"line_number":68,"context_line":"                mock.ANY, search_opts\u003d{\u0027all_tenants\u0027: True})"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        mock_volume_list.assert_called_with("}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_8dc97e79","line":67,"range":{"start_line":67,"start_character":29,"end_line":67,"end_character":47},"updated":"2017-10-06 14:41:11.000000000","message":"If the method is expected to call only once, assert_called_once_with is highly recommended.\n\nUnless mox MultipleTimes() is used, I think assert_called_once_with should be used.","commit_id":"5d81b4fd603fc84ce85df6aaf1e2f9feeb71cdd7"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e31e44165da8e0857558524c1f4bb840bddea10b","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        res \u003d self.client.get(INDEX_URL)"},{"line_number":66,"context_line":"        if not instanceless_volumes:"},{"line_number":67,"context_line":"            mock_server_list.assert_called_with("},{"line_number":68,"context_line":"                mock.ANY, search_opts\u003d{\u0027all_tenants\u0027: True})"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        mock_volume_list.assert_called_with("}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_6d8d22d2","line":67,"range":{"start_line":67,"start_character":29,"end_line":67,"end_character":47},"in_reply_to":"7f515b1d_8dc97e79","updated":"2017-10-06 14:53:38.000000000","message":"Good catch, I\u0027ll fix it in a next patch","commit_id":"5d81b4fd603fc84ce85df6aaf1e2f9feeb71cdd7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f0a4053460dd942f4460f5ae8a9ff23e6abccb24","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        res \u003d self.client.get(INDEX_URL)"},{"line_number":66,"context_line":"        if not instanceless_volumes:"},{"line_number":67,"context_line":"            mock_server_list.assert_called_with("},{"line_number":68,"context_line":"                mock.ANY, search_opts\u003d{\u0027all_tenants\u0027: True})"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        mock_volume_list.assert_called_with("},{"line_number":71,"context_line":"            mock.ANY, sort_dir\u003d\"desc\", marker\u003dNone, paginate\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_ade1dafe","line":68,"range":{"start_line":68,"start_character":16,"end_line":68,"end_character":24},"updated":"2017-10-06 14:41:11.000000000","message":"It is better to check this argument is an object of http.HttpRequest?","commit_id":"5d81b4fd603fc84ce85df6aaf1e2f9feeb71cdd7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"758afebe96500b0ea2b7e0b5fb84e285e8f82c47","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        res \u003d self.client.get(INDEX_URL)"},{"line_number":66,"context_line":"        if not instanceless_volumes:"},{"line_number":67,"context_line":"            mock_server_list.assert_called_with("},{"line_number":68,"context_line":"                mock.ANY, search_opts\u003d{\u0027all_tenants\u0027: True})"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        mock_volume_list.assert_called_with("},{"line_number":71,"context_line":"            mock.ANY, sort_dir\u003d\"desc\", marker\u003dNone, paginate\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_1168f984","line":68,"range":{"start_line":68,"start_character":16,"end_line":68,"end_character":24},"in_reply_to":"7f515b1d_48fff400","updated":"2017-10-07 06:10:35.000000000","message":"You can implement something like mox.IsA().\n\nThis would be like [1] and an example usage is found at [2]. The example is from OSC and this compares two values as \"set\". I think the similar thing can be done.\n\n[1] https://github.com/openstack/python-openstackclient/blob/master/openstackclient/tests/unit/utils.py#L29-L32\n[2] https://github.com/openstack/python-openstackclient/blob/master/openstackclient/tests/unit/network/v2/test_network.py#L259","commit_id":"5d81b4fd603fc84ce85df6aaf1e2f9feeb71cdd7"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"e31e44165da8e0857558524c1f4bb840bddea10b","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        res \u003d self.client.get(INDEX_URL)"},{"line_number":66,"context_line":"        if not instanceless_volumes:"},{"line_number":67,"context_line":"            mock_server_list.assert_called_with("},{"line_number":68,"context_line":"                mock.ANY, search_opts\u003d{\u0027all_tenants\u0027: True})"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        mock_volume_list.assert_called_with("},{"line_number":71,"context_line":"            mock.ANY, sort_dir\u003d\"desc\", marker\u003dNone, paginate\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_48fff400","line":68,"range":{"start_line":68,"start_character":16,"end_line":68,"end_character":24},"in_reply_to":"7f515b1d_ade1dafe","updated":"2017-10-06 14:53:38.000000000","message":"We can\u0027t do it easy with mock. We can check type using call_args [1] if we really care about it\n\n[1] https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.call_args","commit_id":"5d81b4fd603fc84ce85df6aaf1e2f9feeb71cdd7"}],"openstack_dashboard/test/helpers.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f1a4840f0bce7851baa2f39c4e69e3fc263b3292","unresolved":false,"context_lines":[{"line_number":699,"context_line":"class IsHttpRequest(object):"},{"line_number":700,"context_line":"    \"\"\"Class to compare param is django.http.HttpRequest.\"\"\""},{"line_number":701,"context_line":"    def __eq__(self, other):"},{"line_number":702,"context_line":"        return issubclass(type(other), http_request.HttpRequest)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_742af6e7","line":702,"range":{"start_line":702,"start_character":15,"end_line":702,"end_character":64},"updated":"2017-10-10 05:16:09.000000000","message":"Consider using isisntance(). The usage of type() is recommended to avoid as much as possible in the current python.\n\n  isinstance(other, http_request.HttpRequest)\n\n---\n\nOr you can implement something similar to mox.IsA. This is optional. This just shows another option, but HttpRequest is used anywhere, so IsHttpRequest class looks good. Let\u0027s introduce something like IsA when we have a need for other classes.\n\n  class IsA(object):\n    def __init__(self, expected_class):\n      self.expected_class \u003d expected_class\n    def __eq__(self, other):\n      return isinstance(other, self.expected_class)","commit_id":"d2dbb6b9ada4319234f56c761d0807d9c877a8d1"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"51c9d587ee641c356067a07f0381d0b1429014c7","unresolved":false,"context_lines":[{"line_number":699,"context_line":"class IsHttpRequest(object):"},{"line_number":700,"context_line":"    \"\"\"Class to compare param is django.http.HttpRequest.\"\"\""},{"line_number":701,"context_line":"    def __eq__(self, other):"},{"line_number":702,"context_line":"        return issubclass(type(other), http_request.HttpRequest)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_9ffeabac","line":702,"range":{"start_line":702,"start_character":15,"end_line":702,"end_character":64},"in_reply_to":"5f4e5783_742af6e7","updated":"2017-10-10 05:56:26.000000000","message":"OK, I\u0027ll change to use \u0027isinstance\u0027 in a next pach","commit_id":"d2dbb6b9ada4319234f56c761d0807d9c877a8d1"}]}
