)]}'
{"neutron/db/_model_query.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fa7d164989584b057a943e57c1599c4b2102651e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                    # do multiple equals matches"},{"line_number":192,"context_line":"                    query \u003d query.filter("},{"line_number":193,"context_line":"                        or_(*[column \u003d\u003d v for v in value]))"},{"line_number":194,"context_line":"                elif None in value:"},{"line_number":195,"context_line":"                    # in_() operator does not support NULL element so we have"},{"line_number":196,"context_line":"                    # to do multiple equals matches"},{"line_number":197,"context_line":"                    query \u003d query.filter("}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_984365b0","line":194,"updated":"2017-10-27 18:19:00.000000000","message":"(No action required) seems like the (existing) code here assumes that value is always an iterable. Not sure if that\u0027s a valid assumption, but considering that line 210 already assumes that, I am fine with the change as-is.","commit_id":"d104ec67c90a9b0a1eae6f40644424b9df4b4156"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"acbcdde3c2b3281105462f700b4db3d79182454f","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                    # do multiple equals matches"},{"line_number":192,"context_line":"                    query \u003d query.filter("},{"line_number":193,"context_line":"                        or_(*[column \u003d\u003d v for v in value]))"},{"line_number":194,"context_line":"                elif None in value:"},{"line_number":195,"context_line":"                    # in_() operator does not support NULL element so we have"},{"line_number":196,"context_line":"                    # to do multiple equals matches"},{"line_number":197,"context_line":"                    query \u003d query.filter("}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_870c0b95","line":194,"in_reply_to":"3f4b6375_984365b0","updated":"2017-10-30 04:55:46.000000000","message":"In the case of get_objects(), all the filters are first passed to _kwargs_to_filters(), where we check it value is a list, if not we make it one. See [1] and [2]. If v is None, we are return [None]. \n\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/objects/db/api.py#L48\n[2] https://github.com/openstack/neutron/blob/master/neutron/objects/db/api.py#L39","commit_id":"d104ec67c90a9b0a1eae6f40644424b9df4b4156"}],"neutron/tests/unit/objects/db/test_api.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fa7d164989584b057a943e57c1599c4b2102651e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.model \u003d models_v2.Network"},{"line_number":87,"context_line":"        self.ctxt \u003d context.get_admin_context()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_get_object_with_none_value_in_filters(self):"},{"line_number":90,"context_line":"        obj \u003d api.create_object(self.ctxt, self.model, {\u0027name\u0027: \u0027foo\u0027})"},{"line_number":91,"context_line":"        new_obj \u003d api.get_object("},{"line_number":92,"context_line":"            self.ctxt, self.model, name\u003d\u0027foo\u0027, status\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_d8679d51","line":89,"range":{"start_line":89,"start_character":29,"end_line":89,"end_character":33},"updated":"2017-10-27 18:19:00.000000000","message":"-\u003e None?","commit_id":"d104ec67c90a9b0a1eae6f40644424b9df4b4156"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"f6227ae9cdfe4622832b40bf4736c9de27a00a30","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.model \u003d models_v2.Network"},{"line_number":87,"context_line":"        self.ctxt \u003d context.get_admin_context()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_get_object_with_none_value_in_filters(self):"},{"line_number":90,"context_line":"        obj \u003d api.create_object(self.ctxt, self.model, {\u0027name\u0027: \u0027foo\u0027})"},{"line_number":91,"context_line":"        new_obj \u003d api.get_object("},{"line_number":92,"context_line":"            self.ctxt, self.model, name\u003d\u0027foo\u0027, status\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_70b46280","line":89,"updated":"2017-10-18 01:45:37.000000000","message":"I am not sure if this is the best place to add tests. But I could not find any tests specific to db/_model_query.py","commit_id":"d104ec67c90a9b0a1eae6f40644424b9df4b4156"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"23335a6771fc0e4904e01f7d17b9f44c6825670b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.model \u003d models_v2.Network"},{"line_number":87,"context_line":"        self.ctxt \u003d context.get_admin_context()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_get_object_with_none_value_in_filters(self):"},{"line_number":90,"context_line":"        obj \u003d api.create_object(self.ctxt, self.model, {\u0027name\u0027: \u0027foo\u0027})"},{"line_number":91,"context_line":"        new_obj \u003d api.get_object("},{"line_number":92,"context_line":"            self.ctxt, self.model, name\u003d\u0027foo\u0027, status\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_f11dbdbd","line":89,"in_reply_to":"3f4b6375_7878a9f7","updated":"2017-10-19 00:39:23.000000000","message":"Thanks Ann. I will try to move these tests to tests/unit/objects/test_base.py while waiting for Ihar\u0027s comments.","commit_id":"d104ec67c90a9b0a1eae6f40644424b9df4b4156"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"acbcdde3c2b3281105462f700b4db3d79182454f","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.model \u003d models_v2.Network"},{"line_number":87,"context_line":"        self.ctxt \u003d context.get_admin_context()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_get_object_with_none_value_in_filters(self):"},{"line_number":90,"context_line":"        obj \u003d api.create_object(self.ctxt, self.model, {\u0027name\u0027: \u0027foo\u0027})"},{"line_number":91,"context_line":"        new_obj \u003d api.get_object("},{"line_number":92,"context_line":"            self.ctxt, self.model, name\u003d\u0027foo\u0027, status\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_47261319","line":89,"range":{"start_line":89,"start_character":29,"end_line":89,"end_character":33},"in_reply_to":"3f4b6375_d8679d51","updated":"2017-10-30 04:55:46.000000000","message":"I will change to None if another recheck does not help with merge this patch.","commit_id":"d104ec67c90a9b0a1eae6f40644424b9df4b4156"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fa7d164989584b057a943e57c1599c4b2102651e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.model \u003d models_v2.Network"},{"line_number":87,"context_line":"        self.ctxt \u003d context.get_admin_context()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_get_object_with_none_value_in_filters(self):"},{"line_number":90,"context_line":"        obj \u003d api.create_object(self.ctxt, self.model, {\u0027name\u0027: \u0027foo\u0027})"},{"line_number":91,"context_line":"        new_obj \u003d api.get_object("},{"line_number":92,"context_line":"            self.ctxt, self.model, name\u003d\u0027foo\u0027, status\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_388111c5","line":89,"in_reply_to":"3f4b6375_f11dbdbd","updated":"2017-10-27 18:19:00.000000000","message":"I don\u0027t think moving to test_base is needed. I actually prefer if the scope that the test case triggers doesn\u0027t include wider object class layer. Ideally, we would have the tests in test_model_query.py but since it doesn\u0027t exist, and since I am not sure whether it\u0027s easy to implement a test case that would directly target the apply_filters function, I can live with this test case.","commit_id":"d104ec67c90a9b0a1eae6f40644424b9df4b4156"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"001739b632679dc291e4721f8da7e43f07c539a3","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.model \u003d models_v2.Network"},{"line_number":87,"context_line":"        self.ctxt \u003d context.get_admin_context()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def test_get_object_with_none_value_in_filters(self):"},{"line_number":90,"context_line":"        obj \u003d api.create_object(self.ctxt, self.model, {\u0027name\u0027: \u0027foo\u0027})"},{"line_number":91,"context_line":"        new_obj \u003d api.get_object("},{"line_number":92,"context_line":"            self.ctxt, self.model, name\u003d\u0027foo\u0027, status\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_7878a9f7","line":89,"in_reply_to":"5f4e5783_70b46280","updated":"2017-10-18 08:48:28.000000000","message":"Yes, finding the right place for tests is not easy here :)\nProbably, we need to put them in tests/unit/objects/test_base.py . I guess Ihar should know this better.","commit_id":"d104ec67c90a9b0a1eae6f40644424b9df4b4156"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fa7d164989584b057a943e57c1599c4b2102651e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            self.ctxt, self.model, name\u003d\u0027foo\u0027, status\u003dNone)"},{"line_number":93,"context_line":"        self.assertEqual(obj, new_obj)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def test_get_objects_with_none_value_in_filters(self):"},{"line_number":96,"context_line":"        obj \u003d api.create_object(self.ctxt, self.model, {\u0027name\u0027: \u0027foo\u0027})"},{"line_number":97,"context_line":"        new_objs \u003d api.get_objects("},{"line_number":98,"context_line":"            self.ctxt, self.model, name\u003d\u0027foo\u0027, status\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_385a3183","line":95,"range":{"start_line":95,"start_character":8,"end_line":95,"end_character":51},"updated":"2017-10-27 18:19:00.000000000","message":"ditto","commit_id":"d104ec67c90a9b0a1eae6f40644424b9df4b4156"}]}
