)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"1cd71b2f0b31b2243a2ff3629c14ad1494f04dff","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add forced processing to the PeriodicTask"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There are some situations where it is useful to bypass the back-to-back"},{"line_number":10,"context_line":"check. This change allows to force an execution without checking this."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ib0bfda48748f558cde776b43ea0b073728cec8cc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3f4b6375_977296ac","line":9,"range":{"start_line":9,"start_character":1,"end_line":9,"end_character":25},"updated":"2017-10-23 18:51:05.000000000","message":"I need to see following patches to understand if this is useful or not.","commit_id":"dab81440690e1568b551af8d1f137e5b0fc438f8"}],"networking_odl/journal/periodic_task.py":[{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"5853875eb3bdb8177a9c12a3dda490123accc4ca","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        # specified interval. It makes sure that maintenance tasks"},{"line_number":94,"context_line":"        # are not executed back to back."},{"line_number":95,"context_line":"        if not forced and self.task_already_executed_recently(context):"},{"line_number":96,"context_line":"            LOG.info(\"Periodic %s task executed after periodic interval \""},{"line_number":97,"context_line":"                     \"Skipping execution.\", self.task)"},{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if self._lock_task(context):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f4b6375_37b6f78b","line":97,"range":{"start_line":96,"start_character":0,"end_line":97,"end_character":54},"updated":"2017-11-06 05:58:03.000000000","message":"This message is wrong, it does not include explanation for forced parameter, now.","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f14d27bc68fc2c90167a98e2c6af9f6234876b3e","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        # specified interval. It makes sure that maintenance tasks"},{"line_number":94,"context_line":"        # are not executed back to back."},{"line_number":95,"context_line":"        if not forced and self.task_already_executed_recently(context):"},{"line_number":96,"context_line":"            LOG.info(\"Periodic %s task executed after periodic interval \""},{"line_number":97,"context_line":"                     \"Skipping execution.\", self.task)"},{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if self._lock_task(context):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_e5d03f53","line":97,"range":{"start_line":96,"start_character":0,"end_line":97,"end_character":54},"in_reply_to":"1f485f77_62c6856a","updated":"2017-11-13 10:05:02.000000000","message":"Sorry, you are right. I mis communicated. I just wanted a message which indicates that processing is being done forcefully, we are skipping back to back logic. It does not have to be here. are you putting logs somewhere(may be in other patch) that you are starting forceful periodic task?","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"990b7821747a4eaeadf5ed340b68e634e0adca8f","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        # specified interval. It makes sure that maintenance tasks"},{"line_number":94,"context_line":"        # are not executed back to back."},{"line_number":95,"context_line":"        if not forced and self.task_already_executed_recently(context):"},{"line_number":96,"context_line":"            LOG.info(\"Periodic %s task executed after periodic interval \""},{"line_number":97,"context_line":"                     \"Skipping execution.\", self.task)"},{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if self._lock_task(context):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_dbd520bb","line":97,"range":{"start_line":96,"start_character":0,"end_line":97,"end_character":54},"in_reply_to":"1f485f77_e5715fe2","updated":"2017-11-13 11:22:10.000000000","message":"If it is being logged anywhere in neutron or networking-odl then i am ok with it. +1","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"8642a80df7a64a035baba9150c7f8794da41a62e","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        # specified interval. It makes sure that maintenance tasks"},{"line_number":94,"context_line":"        # are not executed back to back."},{"line_number":95,"context_line":"        if not forced and self.task_already_executed_recently(context):"},{"line_number":96,"context_line":"            LOG.info(\"Periodic %s task executed after periodic interval \""},{"line_number":97,"context_line":"                     \"Skipping execution.\", self.task)"},{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if self._lock_task(context):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_e5715fe2","line":97,"range":{"start_line":96,"start_character":0,"end_line":97,"end_character":54},"in_reply_to":"1f485f77_e5d03f53","updated":"2017-11-13 10:37:51.000000000","message":"When it\u0027s done through a SIGHUP neutron already logs for that. When it\u0027s at cold start you\u0027ll have the information on the logs as well.","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"8e708904cc0d270dc06bab437b5ce820cbbe055f","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        # specified interval. It makes sure that maintenance tasks"},{"line_number":94,"context_line":"        # are not executed back to back."},{"line_number":95,"context_line":"        if not forced and self.task_already_executed_recently(context):"},{"line_number":96,"context_line":"            LOG.info(\"Periodic %s task executed after periodic interval \""},{"line_number":97,"context_line":"                     \"Skipping execution.\", self.task)"},{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if self._lock_task(context):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_62c6856a","line":97,"range":{"start_line":96,"start_character":0,"end_line":97,"end_character":54},"in_reply_to":"3f4b6375_37b6f78b","updated":"2017-11-13 09:31:45.000000000","message":"how is it wrong? it still makes sense...","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"}],"networking_odl/tests/unit/journal/test_periodic_task.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c56a36d8e2e86e2463a102a90d7171b84fc94001","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            self.assertTrue(callback_event.wait(timeout\u003d2))"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_forced_execution(self):"},{"line_number":138,"context_line":"        mock_db \u003d mock.patch.object(db, \"was_periodic_task_executed_recently\")"},{"line_number":139,"context_line":"        mock_db.return_value \u003d True"},{"line_number":140,"context_line":"        mock_db.start()"},{"line_number":141,"context_line":"        self.addCleanup(mock_db.stop)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":144,"context_line":"        operation.__name__ \u003d \"test\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_2f7c2971","line":141,"range":{"start_line":138,"start_character":8,"end_line":141,"end_character":37},"updated":"2017-08-17 12:27:46.000000000","message":"Why not use decorator as is done in the test above this one?","commit_id":"6956749d5be4933a10539f225ba2bc49ec5b0cda"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ecc450eda0380bcc44636ce4c488ee4a1cfe54a9","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            self.assertTrue(callback_event.wait(timeout\u003d2))"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_forced_execution(self):"},{"line_number":138,"context_line":"        mock_db \u003d mock.patch.object(db, \"was_periodic_task_executed_recently\")"},{"line_number":139,"context_line":"        mock_db.return_value \u003d True"},{"line_number":140,"context_line":"        mock_db.start()"},{"line_number":141,"context_line":"        self.addCleanup(mock_db.stop)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":144,"context_line":"        operation.__name__ \u003d \"test\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_8382ce51","line":141,"range":{"start_line":138,"start_character":8,"end_line":141,"end_character":37},"in_reply_to":"9f436f4f_2f7c2971","updated":"2017-08-17 14:59:28.000000000","message":"Done","commit_id":"6956749d5be4933a10539f225ba2bc49ec5b0cda"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"c56a36d8e2e86e2463a102a90d7171b84fc94001","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.addCleanup(mock_db.stop)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":144,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":145,"context_line":"        self.thread.register_operation(operation)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        self.thread.execute_ops(forced\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_af8ff973","line":144,"range":{"start_line":144,"start_character":8,"end_line":144,"end_character":35},"updated":"2017-08-17 12:27:46.000000000","message":"Is it really necessary to do this?","commit_id":"6956749d5be4933a10539f225ba2bc49ec5b0cda"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ecc450eda0380bcc44636ce4c488ee4a1cfe54a9","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.addCleanup(mock_db.stop)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":144,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":145,"context_line":"        self.thread.register_operation(operation)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        self.thread.execute_ops(forced\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_9802390b","line":144,"range":{"start_line":144,"start_character":8,"end_line":144,"end_character":35},"in_reply_to":"9f436f4f_af8ff973","updated":"2017-08-17 14:59:28.000000000","message":"Yes, `_execute_op` expects `__name__` to be present and it uses it.","commit_id":"6956749d5be4933a10539f225ba2bc49ec5b0cda"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"aa567b100b14781dd1de8fb50c7abed3dd8ba667","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            mock_status_method.return_value \u003d False"},{"line_number":133,"context_line":"            self.assertTrue(callback_event.wait(timeout\u003d2))"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":136,"context_line":"                       return_value\u003dTrue)"},{"line_number":137,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":138,"context_line":"        operation \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_2e8c61d5","line":135,"updated":"2017-10-26 04:51:26.000000000","message":"do we need it? it will be short circuited by \"and\". If you really wanna keep it, could you assert on this as well.","commit_id":"907a524a37b8add8117cd8e1cfd7fcdee7040996"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"34192045e5cb4a47b70383452b7a1f785d953eb8","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            mock_status_method.return_value \u003d False"},{"line_number":133,"context_line":"            self.assertTrue(callback_event.wait(timeout\u003d2))"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":136,"context_line":"                       return_value\u003dTrue)"},{"line_number":137,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":138,"context_line":"        operation \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_046619c2","line":135,"in_reply_to":"3f4b6375_2e8c61d5","updated":"2017-10-26 13:50:03.000000000","message":"Yes, it\u0027s true that it\u0027s not really needed. The reason that I put it is because it\u0027s explicit -more clear and verbose. \n\n\"... Explicit is better than implicit...\" --Zen of Python (PEP-20)","commit_id":"907a524a37b8add8117cd8e1cfd7fcdee7040996"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"aa567b100b14781dd1de8fb50c7abed3dd8ba667","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":136,"context_line":"                       return_value\u003dTrue)"},{"line_number":137,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":138,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":139,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":140,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_ee6889f5","line":137,"updated":"2017-10-26 04:51:26.000000000","message":"Did you see logs generated by this test case? if so, could you please mock LOG as well?","commit_id":"907a524a37b8add8117cd8e1cfd7fcdee7040996"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"34192045e5cb4a47b70383452b7a1f785d953eb8","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":136,"context_line":"                       return_value\u003dTrue)"},{"line_number":137,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":138,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":139,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":140,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_04d85978","line":137,"in_reply_to":"3f4b6375_ee6889f5","updated":"2017-10-26 13:50:03.000000000","message":"A lot of tests are generating LOGs and yet we don\u0027t silence them. Do you think we should silence them all? If yes, then we need to do it at the base class.\n\nI think mocking LOG would be a little bit overkill.","commit_id":"907a524a37b8add8117cd8e1cfd7fcdee7040996"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"aa567b100b14781dd1de8fb50c7abed3dd8ba667","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        self.thread.execute_ops(forced\u003dTrue)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self.assertEqual(operation.call_count, 1)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_8e27d5ca","line":144,"updated":"2017-10-26 04:51:26.000000000","message":"\"assert_called\" is can be used here.","commit_id":"907a524a37b8add8117cd8e1cfd7fcdee7040996"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"34192045e5cb4a47b70383452b7a1f785d953eb8","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        self.thread.execute_ops(forced\u003dTrue)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self.assertEqual(operation.call_count, 1)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_a4fbc5be","line":144,"in_reply_to":"3f4b6375_8e27d5ca","updated":"2017-10-26 13:50:03.000000000","message":"Done","commit_id":"907a524a37b8add8117cd8e1cfd7fcdee7040996"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"5853875eb3bdb8177a9c12a3dda490123accc4ca","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":151,"context_line":"                       return_value\u003dTrue)"},{"line_number":152,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":153,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":154,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":155,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f4b6375_b7054716","line":152,"range":{"start_line":152,"start_character":35,"end_line":152,"end_character":54},"updated":"2017-11-06 05:58:03.000000000","message":"Did you check my previous comment, if you want to keep it. it would be better to assert on it, as well? or do you it is not necessary?","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f14d27bc68fc2c90167a98e2c6af9f6234876b3e","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":151,"context_line":"                       return_value\u003dTrue)"},{"line_number":152,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":153,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":154,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":155,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_e55effe4","line":152,"range":{"start_line":152,"start_character":35,"end_line":152,"end_character":54},"in_reply_to":"1f485f77_629b2572","updated":"2017-11-13 10:05:02.000000000","message":"We don\u0027t even need to force to return true here or even mock, as it will be never called. But if you are trying to be explicit then it can be asserted to be more explicit.","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"990b7821747a4eaeadf5ed340b68e634e0adca8f","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":151,"context_line":"                       return_value\u003dTrue)"},{"line_number":152,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":153,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":154,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":155,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_7be4ecac","line":152,"range":{"start_line":152,"start_character":35,"end_line":152,"end_character":54},"in_reply_to":"1f485f77_d8f766f5","updated":"2017-11-13 11:22:10.000000000","message":"You don\u0027t have to. This patch is super useful +2","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"8642a80df7a64a035baba9150c7f8794da41a62e","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":151,"context_line":"                       return_value\u003dTrue)"},{"line_number":152,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":153,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":154,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":155,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_d8f766f5","line":152,"range":{"start_line":152,"start_character":35,"end_line":152,"end_character":54},"in_reply_to":"1f485f77_e55effe4","updated":"2017-11-13 10:37:51.000000000","message":"It\u0027s true and yes, I\u0027m trying to be explicit.\n\nThe assertion would not add anything really.\n\nWould you prefer to remove this patch? I\u0027m okey with that.","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"8e708904cc0d270dc06bab437b5ce820cbbe055f","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":151,"context_line":"                       return_value\u003dTrue)"},{"line_number":152,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":153,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":154,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":155,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_629b2572","line":152,"range":{"start_line":152,"start_character":35,"end_line":152,"end_character":54},"in_reply_to":"3f4b6375_b7054716","updated":"2017-11-13 09:31:45.000000000","message":"I don\u0027t think it\u0027s necessary to assert on it, as we are not checking that the method is called, we are just forcing a return value.","commit_id":"84523ffe7090aff25112669965bd013a2bd6f08c"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"b7f79d817fa5486a5932134b94b2cd1ec1523e6b","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":208,"context_line":"                       return_value\u003dTrue)"},{"line_number":209,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":210,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":211,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":212,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":25,"id":"df87a7cf_3de5dda8","line":209,"range":{"start_line":209,"start_character":36,"end_line":209,"end_character":54},"updated":"2017-12-06 17:34:18.000000000","message":"what is it for ?","commit_id":"cce4611fa940d53d8ef2a0c2390247417b8815f8"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"3c4b6d9fcb031509f6f16098adfc625326155c3b","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":208,"context_line":"                       return_value\u003dTrue)"},{"line_number":209,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":210,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":211,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":212,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":25,"id":"df87a7cf_5d2a2190","line":209,"range":{"start_line":209,"start_character":36,"end_line":209,"end_character":54},"in_reply_to":"df87a7cf_3de5dda8","updated":"2017-12-06 17:40:11.000000000","message":"I think this was supposed to used for  setting return_value\u003dTrue within test\u0027s context like it is done in other tests but return_value is set in decorator so is it still needed ?","commit_id":"cce4611fa940d53d8ef2a0c2390247417b8815f8"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"4db3f4339be762c333566ac01286f5920b8a2e83","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @mock.patch.object(db, \"was_periodic_task_executed_recently\","},{"line_number":208,"context_line":"                       return_value\u003dTrue)"},{"line_number":209,"context_line":"    def test_forced_execution(self, mock_status_method):"},{"line_number":210,"context_line":"        operation \u003d mock.MagicMock()"},{"line_number":211,"context_line":"        operation.__name__ \u003d \"test\""},{"line_number":212,"context_line":"        self.thread.register_operation(operation)"}],"source_content_type":"text/x-python","patch_set":25,"id":"df87a7cf_62c3a639","line":209,"range":{"start_line":209,"start_character":36,"end_line":209,"end_character":54},"in_reply_to":"df87a7cf_5d2a2190","updated":"2017-12-07 15:19:55.000000000","message":"exactly. The mock exists to mock that call and return True. Since the mock is done in a decorator then you need to receive the passed object somehow and this variable is there to do just that.","commit_id":"cce4611fa940d53d8ef2a0c2390247417b8815f8"}]}
