)]}'
{"test/unit/cli/test_ringbuilder.py":[{"author":{"_account_id":14867,"name":"Jaivish Kothari(janonymous)","email":"janonymous.codevulture@gmail.com","username":"Janonymous"},"change_message_id":"b28bb3e7c8a2cf295cbbdba365d08eec390207c5","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            ringbuilder.main(argv)"},{"line_number":324,"context_line":"        except SystemExit as e:"},{"line_number":325,"context_line":"            err \u003d e"},{"line_number":326,"context_line":"        self.assertEqual(err.code, 2)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    def test_add_device_ipv6_old_format(self):"},{"line_number":329,"context_line":"        self.create_sample_ring()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_74ee12ee","line":326,"updated":"2015-11-03 16:56:58.000000000","message":"err.code in case of no exception would return some error , as err.code is not defined only err \u003d None is defined , i think this might be a prob ?","commit_id":"5d6b1cb3bd958f5363a71de06a9b0f6cee3e49ec"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"e4aafc3cfb2484ecb92514e7285c057c5721acbf","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            ringbuilder.main(argv)"},{"line_number":324,"context_line":"        except SystemExit as e:"},{"line_number":325,"context_line":"            err \u003d e"},{"line_number":326,"context_line":"        self.assertEqual(err.code, 2)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    def test_add_device_ipv6_old_format(self):"},{"line_number":329,"context_line":"        self.create_sample_ring()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_aae34a32","line":326,"in_reply_to":"fa80f949_2fd83353","updated":"2015-11-05 20:51:25.000000000","message":"Thanks. I changed to have separate checks for whether exception is thrown or not.","commit_id":"5d6b1cb3bd958f5363a71de06a9b0f6cee3e49ec"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"eec132f27d786da297e8c6812f071a2f5a7126e9","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            ringbuilder.main(argv)"},{"line_number":324,"context_line":"        except SystemExit as e:"},{"line_number":325,"context_line":"            err \u003d e"},{"line_number":326,"context_line":"        self.assertEqual(err.code, 2)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    def test_add_device_ipv6_old_format(self):"},{"line_number":329,"context_line":"        self.create_sample_ring()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_2fd83353","line":326,"in_reply_to":"fa80f949_74ee12ee","updated":"2015-11-03 17:06:43.000000000","message":"That case would only happen if the ringbuilder.main() method doesn\u0027t throw a SystemExit exception, I believe.\n\nIf err was never assigned as the exception, we\u0027d probably see something like:\n\n    ValueError: None type has no attirbute code.\n\nI think the self.assertEqual(err.code, 2) here also asserts that err is not of None type, but I\u0027m sure you could do something like: \n\n    self.assertIsNone(err)\n    self.assertEqual(err.code, 2)","commit_id":"5d6b1cb3bd958f5363a71de06a9b0f6cee3e49ec"},{"author":{"_account_id":14867,"name":"Jaivish Kothari(janonymous)","email":"janonymous.codevulture@gmail.com","username":"Janonymous"},"change_message_id":"b28bb3e7c8a2cf295cbbdba365d08eec390207c5","unresolved":false,"context_lines":[{"line_number":469,"context_line":"        mock_stderr \u003d six.StringIO()"},{"line_number":470,"context_line":"        argv \u003d [\"\", self.tmpfile, \"add\","},{"line_number":471,"context_line":"                \"z3-127.0.0.1:6000/sde3_some meta data\", \"3.14159265359\"]"},{"line_number":472,"context_line":"        with mock.patch(\"sys.stdout\", mock_stdout):"},{"line_number":473,"context_line":"            with mock.patch(\"sys.stderr\", mock_stderr):"},{"line_number":474,"context_line":"                self.assertRaises(SystemExit, ringbuilder.main, argv)"},{"line_number":475,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_54c42e3f","line":472,"updated":"2015-11-03 16:56:58.000000000","message":"nested mocks could be like : https://review.openstack.org/#/c/238237/","commit_id":"5d6b1cb3bd958f5363a71de06a9b0f6cee3e49ec"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"eec132f27d786da297e8c6812f071a2f5a7126e9","unresolved":false,"context_lines":[{"line_number":469,"context_line":"        mock_stderr \u003d six.StringIO()"},{"line_number":470,"context_line":"        argv \u003d [\"\", self.tmpfile, \"add\","},{"line_number":471,"context_line":"                \"z3-127.0.0.1:6000/sde3_some meta data\", \"3.14159265359\"]"},{"line_number":472,"context_line":"        with mock.patch(\"sys.stdout\", mock_stdout):"},{"line_number":473,"context_line":"            with mock.patch(\"sys.stderr\", mock_stderr):"},{"line_number":474,"context_line":"                self.assertRaises(SystemExit, ringbuilder.main, argv)"},{"line_number":475,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_afcbc371","line":472,"in_reply_to":"fa80f949_54c42e3f","updated":"2015-11-03 17:06:43.000000000","message":"specifically here - https://review.openstack.org/#/c/238237/3/test/unit/account/test_reaper.py ?","commit_id":"5d6b1cb3bd958f5363a71de06a9b0f6cee3e49ec"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"e4aafc3cfb2484ecb92514e7285c057c5721acbf","unresolved":false,"context_lines":[{"line_number":469,"context_line":"        mock_stderr \u003d six.StringIO()"},{"line_number":470,"context_line":"        argv \u003d [\"\", self.tmpfile, \"add\","},{"line_number":471,"context_line":"                \"z3-127.0.0.1:6000/sde3_some meta data\", \"3.14159265359\"]"},{"line_number":472,"context_line":"        with mock.patch(\"sys.stdout\", mock_stdout):"},{"line_number":473,"context_line":"            with mock.patch(\"sys.stderr\", mock_stderr):"},{"line_number":474,"context_line":"                self.assertRaises(SystemExit, ringbuilder.main, argv)"},{"line_number":475,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_0f0dc88f","line":472,"in_reply_to":"fa80f949_afcbc371","updated":"2015-11-05 20:51:25.000000000","message":"Thanks for the tip. Added in new patch","commit_id":"5d6b1cb3bd958f5363a71de06a9b0f6cee3e49ec"},{"author":{"_account_id":14867,"name":"Jaivish Kothari(janonymous)","email":"janonymous.codevulture@gmail.com","username":"Janonymous"},"change_message_id":"b28bb3e7c8a2cf295cbbdba365d08eec390207c5","unresolved":false,"context_lines":[{"line_number":1378,"context_line":"            ringbuilder.main(argv)"},{"line_number":1379,"context_line":"        except SystemExit as e:"},{"line_number":1380,"context_line":"            err \u003d e"},{"line_number":1381,"context_line":"        self.assertEqual(err.code, 2)"},{"line_number":1382,"context_line":""},{"line_number":1383,"context_line":"    def test_set_replicas_number_of_arguments(self):"},{"line_number":1384,"context_line":"        self.create_sample_ring()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_b43c7a30","line":1381,"updated":"2015-11-03 16:56:58.000000000","message":"same as comment 1, please check other places also if this might be a prob or not.","commit_id":"5d6b1cb3bd958f5363a71de06a9b0f6cee3e49ec"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"e4aafc3cfb2484ecb92514e7285c057c5721acbf","unresolved":false,"context_lines":[{"line_number":1378,"context_line":"            ringbuilder.main(argv)"},{"line_number":1379,"context_line":"        except SystemExit as e:"},{"line_number":1380,"context_line":"            err \u003d e"},{"line_number":1381,"context_line":"        self.assertEqual(err.code, 2)"},{"line_number":1382,"context_line":""},{"line_number":1383,"context_line":"    def test_set_replicas_number_of_arguments(self):"},{"line_number":1384,"context_line":"        self.create_sample_ring()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_8a0446c0","line":1381,"in_reply_to":"fa80f949_b43c7a30","updated":"2015-11-05 20:51:25.000000000","message":"Thx. Updated to handle case where exception is not thrown.","commit_id":"5d6b1cb3bd958f5363a71de06a9b0f6cee3e49ec"},{"author":{"_account_id":18476,"name":"Ganesh Maharaj Mahalingam","email":"ganesh.mahalingam@intel.com","username":"gmmaha"},"change_message_id":"518463e805e435de1861577cc945ee994071626f","unresolved":false,"context_lines":[{"line_number":1372,"context_line":"        argv \u003d [\"\", self.tmpfile, \"set_overload\"]"},{"line_number":1373,"context_line":"        try:"},{"line_number":1374,"context_line":"            ringbuilder.main(argv)"},{"line_number":1375,"context_line":"            self.fail(\"Calling without arguments should fail\")"},{"line_number":1376,"context_line":"        except SystemExit as err:"},{"line_number":1377,"context_line":"            self.assertEqual(err.code, 2)"},{"line_number":1378,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_4215e246","line":1375,"updated":"2015-11-05 22:47:22.000000000","message":"Nitpick. Just a philosophical thing again. have this and assert error code or do AssertRaises and give up on the error code :)","commit_id":"1ac6931190556f9da930ed281dd25e05ec51f3a3"},{"author":{"_account_id":18476,"name":"Ganesh Maharaj Mahalingam","email":"ganesh.mahalingam@intel.com","username":"gmmaha"},"change_message_id":"518463e805e435de1861577cc945ee994071626f","unresolved":false,"context_lines":[{"line_number":1770,"context_line":"        self.create_sample_ring()"},{"line_number":1771,"context_line":"        # Test rebalance using explicit seed parameter"},{"line_number":1772,"context_line":"        argv \u003d [\"\", self.tmpfile, \"rebalance\", \"--seed\", \"2\"]"},{"line_number":1773,"context_line":"        err \u003d None"},{"line_number":1774,"context_line":"        try:"},{"line_number":1775,"context_line":"            ringbuilder.main(argv)"},{"line_number":1776,"context_line":"        except SystemExit as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_0513645c","line":1773,"updated":"2015-11-05 22:47:22.000000000","message":"Shouldnt this be changed to mirror the change you had done on top?","commit_id":"1ac6931190556f9da930ed281dd25e05ec51f3a3"},{"author":{"_account_id":18476,"name":"Ganesh Maharaj Mahalingam","email":"ganesh.mahalingam@intel.com","username":"gmmaha"},"change_message_id":"518463e805e435de1861577cc945ee994071626f","unresolved":false,"context_lines":[{"line_number":1922,"context_line":"    def test_main_no_arguments(self):"},{"line_number":1923,"context_line":"        # Test calling main with no arguments"},{"line_number":1924,"context_line":"        argv \u003d []"},{"line_number":1925,"context_line":"        err \u003d None"},{"line_number":1926,"context_line":"        try:"},{"line_number":1927,"context_line":"            ringbuilder.main(argv)"},{"line_number":1928,"context_line":"        except SystemExit as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_a51b7872","line":1925,"updated":"2015-11-05 22:47:22.000000000","message":"Same for this and the ones below?","commit_id":"1ac6931190556f9da930ed281dd25e05ec51f3a3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d76f38fa885e4a2d91a19af442c6329fe26db38a","unresolved":false,"context_lines":[{"line_number":317,"context_line":"                \"r1z1-127.0.0.1:6000/sda9\", \"3.14159265359\","},{"line_number":318,"context_line":"                \"r1z1-127.0.0.1:6000/sda9\", \"2\"]"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        try:"},{"line_number":321,"context_line":"            ringbuilder.main(argv)"},{"line_number":322,"context_line":"        except SystemExit as err:"},{"line_number":323,"context_line":"            self.assertEqual(err.code, 2)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_9d3b6bd1","line":320,"updated":"2015-11-09 18:01:25.000000000","message":"I\u0027ll pick on this one but there are a few spots where you can make a similar change.  If you replace the try block here with:\n  self.assertRaises(SystemExit, ringbuilder.main, argv)\nyou get the same coverage plus (a) its less code, yay, and (b) if the code doesn\u0027t assert SystemExit you\u0027ll get an error.  As you have it now I believe someone could dork up the code to not produce the desired error and this test wouldn\u0027t catch it, right?","commit_id":"3653a0b1d263ed6564f4b9a3fb2cd4eabc3d32da"}]}
