)]}'
{"swift/obj/auditor.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cbbac804b97533788fab6f40faaed80da64af7cd","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        self.recon_cache_path \u003d conf.get(\u0027recon_cache_path\u0027,"},{"line_number":229,"context_line":"                                         \u0027/var/cache/swift\u0027)"},{"line_number":230,"context_line":"        self.rcache \u003d os.path.join(self.recon_cache_path, \"object.recon\")"},{"line_number":231,"context_line":"        self.interval \u003d int(conf.get(\u0027interval\u0027) or 30)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def _sleep(self):"},{"line_number":234,"context_line":"        time.sleep(self.interval)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da6ed579_a668adf6","line":231,"updated":"2016-01-12 21:19:38.000000000","message":"I\u0027m not sure this would do what you wanted if the value in the conf dict was an integer 0.  We would expect coming from a config file it\u0027d be \u00270\u0027 which does evaluate true - but I think it\u0027d be less confusing to follow the pattern of only use the default option is not present:\n\n    self.interval \u003d int(conf.get(\u0027interval\u0027, DEFAULT))","commit_id":"6bec0f2a1eb4542731e1a3834979920083a8009b"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"f822086d4a3035e8d85c377d2f26de6c01ba5140","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        self.recon_cache_path \u003d conf.get(\u0027recon_cache_path\u0027,"},{"line_number":229,"context_line":"                                         \u0027/var/cache/swift\u0027)"},{"line_number":230,"context_line":"        self.rcache \u003d os.path.join(self.recon_cache_path, \"object.recon\")"},{"line_number":231,"context_line":"        self.interval \u003d int(conf.get(\u0027interval\u0027) or 30)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def _sleep(self):"},{"line_number":234,"context_line":"        time.sleep(self.interval)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da6ed579_bc998270","line":231,"in_reply_to":"da6ed579_a668adf6","updated":"2016-01-13 10:51:37.000000000","message":"Done","commit_id":"6bec0f2a1eb4542731e1a3834979920083a8009b"}],"test/unit/obj/test_auditor.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cbbac804b97533788fab6f40faaed80da64af7cd","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        with mock.patch("},{"line_number":535,"context_line":"                \u0027time.sleep\u0027, mock.MagicMock()) as mock_sleep:"},{"line_number":536,"context_line":"            my_auditor \u003d auditor.ObjectAuditor(self.conf)"},{"line_number":537,"context_line":"            my_auditor.interval \u003d 0.10"},{"line_number":538,"context_line":"            my_auditor._sleep()"},{"line_number":539,"context_line":"            mock_sleep.assert_called_with(my_auditor.interval)"},{"line_number":540,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da6ed579_e6e2259f","line":537,"updated":"2016-01-12 21:19:38.000000000","message":"be more interesting I think to stick the float value in the conf to validate parsing of the type\n\nprobably also want to keep a test for the default value","commit_id":"6bec0f2a1eb4542731e1a3834979920083a8009b"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"19c52a70cb59796d9cbf4b19bba19d31c1bd6a4b","unresolved":false,"context_lines":[{"line_number":537,"context_line":"            my_auditor._sleep()"},{"line_number":538,"context_line":"            mock_sleep.assert_called_with(30)"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"            my_auditor \u003d auditor.ObjectAuditor(self.conf)"},{"line_number":541,"context_line":"            my_auditor.interval \u003d 2"},{"line_number":542,"context_line":"            my_auditor._sleep()"},{"line_number":543,"context_line":"            mock_sleep.assert_called_with(my_auditor.interval)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_679d8009","line":540,"updated":"2016-01-14 05:31:34.000000000","message":"I think it would be better to test that value can change via the config, not directly inside the auditor:\n\n  my_conf \u003d dict(interval\u003d2)\n  my_conf.update(self.conf)\n  my_auditor \u003d auditor.ObjectAuditor(my_conf)\n  my_auditor._sleep()\n  mock_sleep.assert_called_with(2)","commit_id":"70a3082c8ff352749262e8069f8550862a273387"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"80fd51f9a2b0f1da638c443b0d332b845d2d15a8","unresolved":false,"context_lines":[{"line_number":537,"context_line":"            my_auditor._sleep()"},{"line_number":538,"context_line":"            mock_sleep.assert_called_with(30)"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"            my_auditor \u003d auditor.ObjectAuditor(self.conf)"},{"line_number":541,"context_line":"            my_auditor.interval \u003d 2"},{"line_number":542,"context_line":"            my_auditor._sleep()"},{"line_number":543,"context_line":"            mock_sleep.assert_called_with(my_auditor.interval)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_3e60e1ce","line":540,"in_reply_to":"da6ed579_679d8009","updated":"2016-01-14 11:53:28.000000000","message":"Done","commit_id":"70a3082c8ff352749262e8069f8550862a273387"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"19c52a70cb59796d9cbf4b19bba19d31c1bd6a4b","unresolved":false,"context_lines":[{"line_number":540,"context_line":"            my_auditor \u003d auditor.ObjectAuditor(self.conf)"},{"line_number":541,"context_line":"            my_auditor.interval \u003d 2"},{"line_number":542,"context_line":"            my_auditor._sleep()"},{"line_number":543,"context_line":"            mock_sleep.assert_called_with(my_auditor.interval)"},{"line_number":544,"context_line":""},{"line_number":545,"context_line":"    def test_run_parallel_audit(self):"},{"line_number":546,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_0a3049e7","line":543,"updated":"2016-01-14 05:31:34.000000000","message":"Also using the auditors internal value of internal kinda makes the test moot. Cause we don\u0027t know if in the future any code might accidentally change the interval, and this test could still pass. I\u0027d rather have something that wont change to test against:\n\n   mock_sleep.assert_called_with(2)\nor\n   my_interval \u003d 2\n   ..\n   mock_sleep.assert_called_with(my_interval)","commit_id":"70a3082c8ff352749262e8069f8550862a273387"},{"author":{"_account_id":16896,"name":"Ondřej Nový","email":"novy@ondrej.org","username":"onovy"},"change_message_id":"80fd51f9a2b0f1da638c443b0d332b845d2d15a8","unresolved":false,"context_lines":[{"line_number":540,"context_line":"            my_auditor \u003d auditor.ObjectAuditor(self.conf)"},{"line_number":541,"context_line":"            my_auditor.interval \u003d 2"},{"line_number":542,"context_line":"            my_auditor._sleep()"},{"line_number":543,"context_line":"            mock_sleep.assert_called_with(my_auditor.interval)"},{"line_number":544,"context_line":""},{"line_number":545,"context_line":"    def test_run_parallel_audit(self):"},{"line_number":546,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_5e5d9513","line":543,"in_reply_to":"da6ed579_0a3049e7","updated":"2016-01-14 11:53:28.000000000","message":"Done","commit_id":"70a3082c8ff352749262e8069f8550862a273387"}]}
