)]}'
{"neutron/objects/base.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"fdbca51bc35f56ec0acd2c70ef5217eda37ec65d","unresolved":false,"context_lines":[{"line_number":553,"context_line":"        :return: number of matching objects"},{"line_number":554,"context_line":"        \"\"\""},{"line_number":555,"context_line":"        cls.validate_filters(**kwargs)"},{"line_number":556,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":557,"context_line":"            return obj_db_api.count("},{"line_number":558,"context_line":"                context, cls.db_model, **cls.modify_fields_to_db(kwargs)"},{"line_number":559,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_bd82a2c6","line":556,"updated":"2016-08-03 09:58:29.000000000","message":"do we really need an autonested transaction? it\u0027s just a read operation, it doesn\u0027t modify any data.","commit_id":"b4d8fa3443f1a692cfa3170ea020e0d6dfde873b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8d136fd744fba5bc027a8d7ac7f9a4596d03c3ef","unresolved":false,"context_lines":[{"line_number":553,"context_line":"        :return: number of matching objects"},{"line_number":554,"context_line":"        \"\"\""},{"line_number":555,"context_line":"        cls.validate_filters(**kwargs)"},{"line_number":556,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":557,"context_line":"            return obj_db_api.count("},{"line_number":558,"context_line":"                context, cls.db_model, **cls.modify_fields_to_db(kwargs)"},{"line_number":559,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_37b7dff6","line":556,"in_reply_to":"bacf61ea_bd82a2c6","updated":"2016-08-03 14:37:50.000000000","message":"Done","commit_id":"b4d8fa3443f1a692cfa3170ea020e0d6dfde873b"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"5155d81c6933058c63509f64a2bd5537191271ba","unresolved":false,"context_lines":[{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    @classmethod"},{"line_number":206,"context_line":"    def count(cls, context, **kwargs):"},{"line_number":207,"context_line":"        \u0027\u0027\u0027Count the number of objects matching filtering criteria.\u0027\u0027\u0027"},{"line_number":208,"context_line":"        return len(cls.get_objects(context, **kwargs))"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_4afedaae","line":207,"range":{"start_line":207,"start_character":0,"end_line":207,"end_character":8},"updated":"2016-08-04 21:07:29.000000000","message":"nit: It will be nice to have descriptive docstring here as in lines: 549-553","commit_id":"0fce7de103d0a767ad84acf645987e34e885d141"}],"neutron/objects/db/api.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"35af5c2fdb9c7d35282d9e806ad5da5b0e43fc9d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    return _get_filter_query(context, model, **kwargs).first()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def count(context, model, **kwargs):"},{"line_number":34,"context_line":"    return _get_filter_query(context, model, **kwargs).count()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_ba49f6b9","line":33,"range":{"start_line":33,"start_character":4,"end_line":33,"end_character":9},"updated":"2016-08-03 14:50:25.000000000","message":"Would it make sense to add a test into BaseDbObjectTestCase to fetch count? Just in sake to trigger this method, it\u0027s only mocked so far.","commit_id":"bf1972e82ad178e5143ec83b8cc16a538c571b39"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a601b35b5180a8115530a6b84c42f6c9a307c28b","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    return _get_filter_query(context, model, **kwargs).first()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def count(context, model, **kwargs):"},{"line_number":34,"context_line":"    return _get_filter_query(context, model, **kwargs).count()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_ba53b638","line":33,"range":{"start_line":33,"start_character":4,"end_line":33,"end_character":9},"in_reply_to":"bacf61ea_ba49f6b9","updated":"2016-08-03 14:59:00.000000000","message":"Oh right. Good catch.","commit_id":"bf1972e82ad178e5143ec83b8cc16a538c571b39"}],"neutron/tests/unit/objects/test_base.py":[{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"87fe9c6a4dab33f245352d12686227be946aa3d6","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        self.assertEqual(expected, observed)"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"class NeutronObjectCount(test_base.BaseTestCase):"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def test_count(self):"},{"line_number":851,"context_line":"        context_ \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_dca4bf09","line":848,"range":{"start_line":848,"start_character":6,"end_line":848,"end_character":24},"updated":"2016-08-03 08:06:43.000000000","message":"nit: NeutronObjectCountTestCase","commit_id":"ba71a4b18a2a1590ded59dc73d2cf44405157603"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8aaad4e4326a11ed5d113d29dbc7697aa2147099","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        self.assertEqual(expected, observed)"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"class NeutronObjectCount(test_base.BaseTestCase):"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def test_count(self):"},{"line_number":851,"context_line":"        context_ \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_9cb527d2","line":848,"range":{"start_line":848,"start_character":6,"end_line":848,"end_character":24},"in_reply_to":"bacf61ea_dca4bf09","updated":"2016-08-03 08:10:58.000000000","message":"Done","commit_id":"ba71a4b18a2a1590ded59dc73d2cf44405157603"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"fdbca51bc35f56ec0acd2c70ef5217eda37ec65d","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        self.assertEqual(expected, observed)"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"class NeutronObjectCountTestCase(test_base.BaseTestCase):"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def test_count(self):"},{"line_number":851,"context_line":"        context_ \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_8bbb1b75","line":848,"updated":"2016-08-03 09:58:29.000000000","message":"I don\u0027t see the need for this test...can you enlighten me? :)","commit_id":"b4d8fa3443f1a692cfa3170ea020e0d6dfde873b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8d136fd744fba5bc027a8d7ac7f9a4596d03c3ef","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        self.assertEqual(expected, observed)"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"class NeutronObjectCountTestCase(test_base.BaseTestCase):"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def test_count(self):"},{"line_number":851,"context_line":"        context_ \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_b7ed8fb9","line":848,"in_reply_to":"bacf61ea_8bbb1b75","updated":"2016-08-03 14:37:50.000000000","message":"It tests the default implementation for non-db objects where we execute len() on result of get_objects(). The class under testing handles count filter argument so that it defines the number of returned objects (line 285+).","commit_id":"b4d8fa3443f1a692cfa3170ea020e0d6dfde873b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"35af5c2fdb9c7d35282d9e806ad5da5b0e43fc9d","unresolved":false,"context_lines":[{"line_number":286,"context_line":"    def get_objects(cls, context, _pager\u003dNone, count\u003d1, **kwargs):"},{"line_number":287,"context_line":"        return ["},{"line_number":288,"context_line":"            cls.get_object(context, **kwargs)"},{"line_number":289,"context_line":"            for i in range(0, count)"},{"line_number":290,"context_line":"        ]"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_da902a98","line":289,"range":{"start_line":289,"start_character":27,"end_line":289,"end_character":29},"updated":"2016-08-03 14:50:25.000000000","message":"Nit: 0 is implicit","commit_id":"bf1972e82ad178e5143ec83b8cc16a538c571b39"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a601b35b5180a8115530a6b84c42f6c9a307c28b","unresolved":false,"context_lines":[{"line_number":286,"context_line":"    def get_objects(cls, context, _pager\u003dNone, count\u003d1, **kwargs):"},{"line_number":287,"context_line":"        return ["},{"line_number":288,"context_line":"            cls.get_object(context, **kwargs)"},{"line_number":289,"context_line":"            for i in range(0, count)"},{"line_number":290,"context_line":"        ]"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_8dddde72","line":289,"range":{"start_line":289,"start_character":27,"end_line":289,"end_character":29},"in_reply_to":"bacf61ea_da902a98","updated":"2016-08-03 14:59:00.000000000","message":"Done","commit_id":"bf1972e82ad178e5143ec83b8cc16a538c571b39"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"35af5c2fdb9c7d35282d9e806ad5da5b0e43fc9d","unresolved":false,"context_lines":[{"line_number":848,"context_line":"class NeutronObjectCountTestCase(test_base.BaseTestCase):"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def test_count(self):"},{"line_number":851,"context_line":"        context_ \u003d context.get_admin_context()"},{"line_number":852,"context_line":"        expected \u003d 10"},{"line_number":853,"context_line":"        self.assertEqual("},{"line_number":854,"context_line":"            expected, FakeNeutronObject.count(context_, count\u003dexpected))"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_fa8a4e19","line":851,"range":{"start_line":851,"start_character":8,"end_line":851,"end_character":16},"updated":"2016-08-03 14:50:25.000000000","message":"Nit: this has no effect on the called method, so it can be None and we\u0027ll save ~3 bytes of memory. :)","commit_id":"bf1972e82ad178e5143ec83b8cc16a538c571b39"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a601b35b5180a8115530a6b84c42f6c9a307c28b","unresolved":false,"context_lines":[{"line_number":848,"context_line":"class NeutronObjectCountTestCase(test_base.BaseTestCase):"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def test_count(self):"},{"line_number":851,"context_line":"        context_ \u003d context.get_admin_context()"},{"line_number":852,"context_line":"        expected \u003d 10"},{"line_number":853,"context_line":"        self.assertEqual("},{"line_number":854,"context_line":"            expected, FakeNeutronObject.count(context_, count\u003dexpected))"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_0d5e0ee9","line":851,"range":{"start_line":851,"start_character":8,"end_line":851,"end_character":16},"in_reply_to":"bacf61ea_fa8a4e19","updated":"2016-08-03 14:59:00.000000000","message":"Woohoo! I can run my SETI cluster in those bytes!","commit_id":"bf1972e82ad178e5143ec83b8cc16a538c571b39"}]}
