)]}'
{"test/unit/obj/test_auditor.py":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"cef97584c5d5061d60f59219e2c7b9f5ce7ad7e3","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        # pick up even more additional code coverage, misc paths"},{"line_number":238,"context_line":"        auditor_worker.log_time \u003d -1"},{"line_number":239,"context_line":"        auditor_worker.stats_sizes \u003d []"},{"line_number":240,"context_line":"        auditor_worker.audit_all_objects(device_dirs\u003d[\u0027sda\u0027, \u0027sdb\u0027])"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def test_object_run_once_no_sda(self):"},{"line_number":243,"context_line":"        auditor_worker \u003d auditor.AuditorWorker(self.conf, self.logger,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2Faks%3D","line":240,"updated":"2014-04-14 18:21:31.000000000","message":"Can we assert that a state change has been reached following this run?","commit_id":"bf63b029a83df2c5d05dc3e649f55aa90ca4fd16"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"ce951c460abf45a4c060d6d384f20ad44c8d83b9","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        # pick up even more additional code coverage, misc paths"},{"line_number":238,"context_line":"        auditor_worker.log_time \u003d -1"},{"line_number":239,"context_line":"        auditor_worker.stats_sizes \u003d []"},{"line_number":240,"context_line":"        auditor_worker.audit_all_objects(device_dirs\u003d[\u0027sda\u0027, \u0027sdb\u0027])"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def test_object_run_once_no_sda(self):"},{"line_number":243,"context_line":"        auditor_worker \u003d auditor.AuditorWorker(self.conf, self.logger,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2FUSE%3D","line":240,"in_reply_to":"AAAAW3%2F%2Faks%3D","updated":"2014-04-15 12:34:23.000000000","message":"Done","commit_id":"bf63b029a83df2c5d05dc3e649f55aa90ca4fd16"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"cef97584c5d5061d60f59219e2c7b9f5ce7ad7e3","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        was_fork \u003d os.fork"},{"line_number":469,"context_line":"        was_wait \u003d os.wait"},{"line_number":470,"context_line":"        os.fork \u003d mocker.mock_fork"},{"line_number":471,"context_line":"        os.wait \u003d mocker.mock_wait"},{"line_number":472,"context_line":"        try:"},{"line_number":473,"context_line":"            my_auditor.run_once(zero_byte_fps\u003d50)"},{"line_number":474,"context_line":"            my_auditor.logger.exception.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2FakU%3D","line":471,"updated":"2014-04-14 18:21:31.000000000","message":"Can you change this to use mock for fork and wait?","commit_id":"bf63b029a83df2c5d05dc3e649f55aa90ca4fd16"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"30c95d5aeb106d9533ce3fa4cbddbd3a3ad0c023","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        was_fork \u003d os.fork"},{"line_number":469,"context_line":"        was_wait \u003d os.wait"},{"line_number":470,"context_line":"        os.fork \u003d mocker.mock_fork"},{"line_number":471,"context_line":"        os.wait \u003d mocker.mock_wait"},{"line_number":472,"context_line":"        try:"},{"line_number":473,"context_line":"            my_auditor.run_once(zero_byte_fps\u003d50)"},{"line_number":474,"context_line":"            my_auditor.logger.exception.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2F0bY%3D","line":471,"in_reply_to":"AAAAW3%2F%2FT%2Fk%3D","updated":"2014-04-17 07:39:56.000000000","message":"To use mock.MagicMock for os.fork and os.wait you could use something like this:\n\nhttp://paste.openstack.org/show/76049/","commit_id":"bf63b029a83df2c5d05dc3e649f55aa90ca4fd16"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"ce951c460abf45a4c060d6d384f20ad44c8d83b9","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        was_fork \u003d os.fork"},{"line_number":469,"context_line":"        was_wait \u003d os.wait"},{"line_number":470,"context_line":"        os.fork \u003d mocker.mock_fork"},{"line_number":471,"context_line":"        os.wait \u003d mocker.mock_wait"},{"line_number":472,"context_line":"        try:"},{"line_number":473,"context_line":"            my_auditor.run_once(zero_byte_fps\u003d50)"},{"line_number":474,"context_line":"            my_auditor.logger.exception.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2FT%2Fk%3D","line":471,"in_reply_to":"AAAAW3%2F%2FakU%3D","updated":"2014-04-15 12:34:23.000000000","message":"So I tried this but the test immediately fails on line 487 because run_forever calls os.wait (pid \u003d os.wait()[0]) and expects the return value provided by mock_wait().  The return value by just mocking the function (assuming I did it right) is the mock function  itself \u003cMagicMock name\u003d\u0027mock().__getitem__()\u0027 id\u003d\u002754609360\u0027\u003e.  What I did was to basically set os.fork\u003dmock.MagickMock() and the same for wait then make the changes to assert the the correct # of calls later on but this doesn\u0027t change the return value of the mocked function.  Did I miss the boat here?  Thanks Pete","commit_id":"bf63b029a83df2c5d05dc3e649f55aa90ca4fd16"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"effd3adf23fdbc5d790b8c690373996037d06ec3","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        # pick up even more additional code coverage, misc paths"},{"line_number":239,"context_line":"        auditor_worker.log_time \u003d -1"},{"line_number":240,"context_line":"        auditor_worker.stats_sizes \u003d []"},{"line_number":241,"context_line":"        auditor_worker.audit_all_objects(device_dirs\u003d[\u0027sda\u0027, \u0027sdb\u0027])"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def test_object_run_once_no_sda(self):"},{"line_number":244,"context_line":"        auditor_worker \u003d auditor.AuditorWorker(self.conf, self.logger,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FzOo%3D","line":241,"updated":"2014-04-17 11:02:07.000000000","message":"Can the asserts from lines 233 - 236 be copied here and properly adjusted?","commit_id":"4c6d5351fe94b43d223659f2ff0b80f317104a23"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"915766b11744ef0e21b8a100209b1d9215206dc8","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        # pick up even more additional code coverage, misc paths"},{"line_number":239,"context_line":"        auditor_worker.log_time \u003d -1"},{"line_number":240,"context_line":"        auditor_worker.stats_sizes \u003d []"},{"line_number":241,"context_line":"        auditor_worker.audit_all_objects(device_dirs\u003d[\u0027sda\u0027, \u0027sdb\u0027])"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def test_object_run_once_no_sda(self):"},{"line_number":244,"context_line":"        auditor_worker \u003d auditor.AuditorWorker(self.conf, self.logger,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FwkU%3D","line":241,"in_reply_to":"AAAAXH%2F%2FzOo%3D","updated":"2014-04-17 16:56:58.000000000","message":"indeed they can!  no changes needed though in the values based on the addtl path(s) covered but I will most certainly add them to be sure.  Thanks!!","commit_id":"4c6d5351fe94b43d223659f2ff0b80f317104a23"}]}
