)]}'
{"test/unit/common/test_db_replicator.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"88d187508369eb329f733a1e28e50fae4df18b42","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        self._patch(patch.object, db_replicator, \u0027ismount\u0027, lambda *args: True)"},{"line_number":514,"context_line":"        self._patch(patch.object, db_replicator, \u0027unlink_older_than\u0027,"},{"line_number":515,"context_line":"                    mock_unlink_older_than)"},{"line_number":516,"context_line":"        self._patch(patch.object, os.path, \u0027isdir\u0027, mock_isdir)"},{"line_number":517,"context_line":"        self._patch(patch.object, db_replicator, \u0027roundrobin_datadirs\u0027,"},{"line_number":518,"context_line":"                    lambda *args: [(\u0027123\u0027, \u0027/srv/node/sda/c.db\u0027, 1)])"},{"line_number":519,"context_line":"        self._patch(patch.object, replicator.cpool, \u0027spawn_n\u0027, mock_spawn_n)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BDf0%3D","line":516,"updated":"2013-12-03 01:34:37.000000000","message":"I\u0027ve had bad luck patching the os module globally, if some upstream cleanup or teardown makes a call to isdir - it\u0027s going to get the mock instead of the real method until the patcher\u0027s stop method is called.\n\nBetter to create a localized mock hanging off the module under test that uses the wrap kwarg, e.g.\n\nhttp://paste.openstack.org/show/54322/","commit_id":"4481d97dfd934cff3a65f66427fe0e87d480af93"},{"author":{"_account_id":9225,"name":"Cristian A Sanchez","email":"cabsanchez@gmail.com","username":"casanch1"},"change_message_id":"cf4a44b56be386a692b95e45920403ba1e6208e2","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        self._patch(patch.object, db_replicator, \u0027ismount\u0027, lambda *args: True)"},{"line_number":514,"context_line":"        self._patch(patch.object, db_replicator, \u0027unlink_older_than\u0027,"},{"line_number":515,"context_line":"                    mock_unlink_older_than)"},{"line_number":516,"context_line":"        self._patch(patch.object, os.path, \u0027isdir\u0027, mock_isdir)"},{"line_number":517,"context_line":"        self._patch(patch.object, db_replicator, \u0027roundrobin_datadirs\u0027,"},{"line_number":518,"context_line":"                    lambda *args: [(\u0027123\u0027, \u0027/srv/node/sda/c.db\u0027, 1)])"},{"line_number":519,"context_line":"        self._patch(patch.object, replicator.cpool, \u0027spawn_n\u0027, mock_spawn_n)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BApc%3D","line":516,"in_reply_to":"AAAATn%2F%2BDf0%3D","updated":"2013-12-03 16:38:27.000000000","message":"OK, I will change the patches to os with the other solution. Thanks","commit_id":"4481d97dfd934cff3a65f66427fe0e87d480af93"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"88d187508369eb329f733a1e28e50fae4df18b42","unresolved":false,"context_lines":[{"line_number":771,"context_line":"            return \u0027rsync_then_merge-called\u0027"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":"        self._patch(patch.object, rpc, \u0027rsync_then_merge\u0027,"},{"line_number":774,"context_line":"                    mock_rsync_then_merge)"},{"line_number":775,"context_line":""},{"line_number":776,"context_line":"        response \u003d rpc.dispatch((\u0027drive\u0027, \u0027part\u0027, \u0027hash\u0027),"},{"line_number":777,"context_line":"                                [\u0027rsync_then_merge\u0027, \u0027arg1\u0027, \u0027arg2\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BDkM%3D","line":774,"updated":"2013-12-03 01:34:37.000000000","message":"since this object only exists during the life of the test it\u0027s not necessary and probably bad form to leak it out to self._patchers just to swap out one method.  There\u0027s a few tests that do this needlessly.\n\nAlso, boo-berries on monkey patching the class under test.","commit_id":"4481d97dfd934cff3a65f66427fe0e87d480af93"},{"author":{"_account_id":9225,"name":"Cristian A Sanchez","email":"cabsanchez@gmail.com","username":"casanch1"},"change_message_id":"cf4a44b56be386a692b95e45920403ba1e6208e2","unresolved":false,"context_lines":[{"line_number":771,"context_line":"            return \u0027rsync_then_merge-called\u0027"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":"        self._patch(patch.object, rpc, \u0027rsync_then_merge\u0027,"},{"line_number":774,"context_line":"                    mock_rsync_then_merge)"},{"line_number":775,"context_line":""},{"line_number":776,"context_line":"        response \u003d rpc.dispatch((\u0027drive\u0027, \u0027part\u0027, \u0027hash\u0027),"},{"line_number":777,"context_line":"                                [\u0027rsync_then_merge\u0027, \u0027arg1\u0027, \u0027arg2\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9%2F7Y%3D","line":774,"in_reply_to":"AAAATn%2F%2BDkM%3D","updated":"2013-12-03 16:38:27.000000000","message":"I changed this implementation to use the actual method.","commit_id":"4481d97dfd934cff3a65f66427fe0e87d480af93"}]}
