)]}'
{"networking_odl/tests/unit/cmd/test_set_ovs_hostconfigs.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"4a8f9948031c81ac4500dcfa8bdb11c2d4c3e14d","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            self.assertNotEqual(-1, output.find(LOGGING_PERMISSION_REQUIRED))"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def test_log_in_file(self):"},{"line_number":297,"context_line":"        with tempfile.TemporaryFile() as fp:"},{"line_number":298,"context_line":"            set_ovs_hostconfigs.main((\"--log-file\u003d%s\" % fp.name,))"},{"line_number":299,"context_line":"            logs \u003d [LOGGING_ENABLED, LOGGING_PERMISSION_REQUIRED]"},{"line_number":300,"context_line":"            for line, count in fp.readline():"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_6a13b9b9","line":297,"range":{"start_line":297,"start_character":22,"end_line":297,"end_character":35},"updated":"2018-01-23 06:08:00.000000000","message":"How about NamedTemporaryFile?","commit_id":"fdb25569377269d39a37f67352554a5fdc93b7de"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"f42704181f82b3fb3d84db87f700a8eaae0eebc7","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            logs \u003d [LOGGING_ENABLED, LOGGING_PERMISSION_REQUIRED]"},{"line_number":300,"context_line":"            for line, count in fp.readline():"},{"line_number":301,"context_line":"                self.assertNotEqual(-1, line.find(logs[count]))"},{"line_number":302,"context_line":"        os.unlink(fp.name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_366e9096","line":302,"range":{"start_line":302,"start_character":18,"end_line":302,"end_character":25},"updated":"2018-01-22 17:31:27.000000000","message":"path type is not accepted by python 3 you may have to make py35 friendly.","commit_id":"fdb25569377269d39a37f67352554a5fdc93b7de"},{"author":{"_account_id":19853,"name":"Nguyen Hung Phuong","email":"phuongnh@vn.fujitsu.com","username":"phuongnh"},"change_message_id":"afe42dc0e6488042ffa596376a9614a144c3873e","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            logs \u003d [LOGGING_ENABLED, LOGGING_PERMISSION_REQUIRED]"},{"line_number":300,"context_line":"            for line, count in fp.readline():"},{"line_number":301,"context_line":"                self.assertNotEqual(-1, line.find(logs[count]))"},{"line_number":302,"context_line":"        path\u003dos.path.normpath(str(fp.name))"},{"line_number":303,"context_line":"        os.unlink(path)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_b82fdb86","line":302,"updated":"2018-01-23 07:11:20.000000000","message":"path \u003d os.path.normpath(str(fp.name))","commit_id":"96776b5d267186f313b4e292d7328728c95934a6"},{"author":{"_account_id":25587,"name":"Shubhendu Poothia","email":"poothia.shubhendu@gmail.com","username":"shubhendu"},"change_message_id":"eff37994a2b378d509e032418cfaceb321af62ee","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            logs \u003d [LOGGING_ENABLED, LOGGING_PERMISSION_REQUIRED]"},{"line_number":300,"context_line":"            for line, count in fp.readline():"},{"line_number":301,"context_line":"                self.assertNotEqual(-1, line.find(logs[count]))"},{"line_number":302,"context_line":"        path\u003dos.path.normpath(str(fp.name))"},{"line_number":303,"context_line":"        os.unlink(path)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_58833757","line":302,"in_reply_to":"7f96bb07_b82fdb86","updated":"2018-01-23 07:17:28.000000000","message":"Done","commit_id":"96776b5d267186f313b4e292d7328728c95934a6"},{"author":{"_account_id":19853,"name":"Nguyen Hung Phuong","email":"phuongnh@vn.fujitsu.com","username":"phuongnh"},"change_message_id":"49971110565a84f52800229b0dce7f2febe735c7","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                self.assertNotEqual(-1, line.find(logs[count]))"},{"line_number":302,"context_line":"        path \u003d os.path.normpath(str(fp.name))"},{"line_number":303,"context_line":"        os.unlink(path)"},{"line_number":304,"context_line":"        "}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_78c073e1","line":304,"updated":"2018-01-23 07:41:20.000000000","message":"please remove this line.","commit_id":"d71c168c4e8e6caeb28bbc986093f3cbb4cd1a3d"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"23740961d5c278797b03aa4025a283f43d935d61","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def test_log_in_file(self):"},{"line_number":297,"context_line":"        # TODO(poothia): make test cases idempotent"},{"line_number":298,"context_line":"        with tempfile.TemporaryFile() as fp:"},{"line_number":299,"context_line":"            set_ovs_hostconfigs.main((\"--log-file\u003d%s\" % fp.name,))"},{"line_number":300,"context_line":"            logs \u003d [LOGGING_ENABLED, LOGGING_PERMISSION_REQUIRED]"},{"line_number":301,"context_line":"            for line, count in fp.readline():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_f331cf0c","line":298,"range":{"start_line":298,"start_character":22,"end_line":298,"end_character":35},"updated":"2018-02-20 22:29:43.000000000","message":"NamedTemporaryFile(delete\u003dTrue) is the one you\u0027d like to use.","commit_id":"b92bb66a32f954be2e8ae87ddc23ac322705a150"},{"author":{"_account_id":25587,"name":"Shubhendu Poothia","email":"poothia.shubhendu@gmail.com","username":"shubhendu"},"change_message_id":"5c410acd361c2987ca4b552f3a28a3d6cc65d353","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def test_log_in_file(self):"},{"line_number":297,"context_line":"        # TODO(poothia): make test cases idempotent"},{"line_number":298,"context_line":"        with tempfile.TemporaryFile() as fp:"},{"line_number":299,"context_line":"            set_ovs_hostconfigs.main((\"--log-file\u003d%s\" % fp.name,))"},{"line_number":300,"context_line":"            logs \u003d [LOGGING_ENABLED, LOGGING_PERMISSION_REQUIRED]"},{"line_number":301,"context_line":"            for line, count in fp.readline():"}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_d27706d4","line":298,"range":{"start_line":298,"start_character":22,"end_line":298,"end_character":35},"in_reply_to":"3fa0c359_f331cf0c","updated":"2018-03-16 06:38:05.000000000","message":"Done","commit_id":"b92bb66a32f954be2e8ae87ddc23ac322705a150"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"3e1cd5c209870a049d82403e5aacca667e78b929","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            set_ovs_hostconfigs.main((\"--log-file\u003d%s\" % fp.name,))"},{"line_number":300,"context_line":"            logs \u003d [LOGGING_ENABLED, LOGGING_PERMISSION_REQUIRED]"},{"line_number":301,"context_line":"            count \u003d 0"},{"line_number":302,"context_line":"            for line in fp.readlines():"},{"line_number":303,"context_line":"                self.assertNotEqual(-1, str(line).find(logs[count]))"},{"line_number":304,"context_line":"                count \u003d count + 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"df7087c5_eeac03f0","line":302,"range":{"start_line":302,"start_character":24,"end_line":302,"end_character":38},"updated":"2018-03-17 06:29:05.000000000","message":"for count, line in enumerate(fp.readlines())\nor just don\u0027t change this line.","commit_id":"45af2b9e8d910fe586b1b483410d6ac69a21165a"},{"author":{"_account_id":25587,"name":"Shubhendu Poothia","email":"poothia.shubhendu@gmail.com","username":"shubhendu"},"change_message_id":"afbae80c4478ee8e2f2dc618dd2522b3dcb9eba7","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            set_ovs_hostconfigs.main((\"--log-file\u003d%s\" % fp.name,))"},{"line_number":300,"context_line":"            logs \u003d [LOGGING_ENABLED, LOGGING_PERMISSION_REQUIRED]"},{"line_number":301,"context_line":"            count \u003d 0"},{"line_number":302,"context_line":"            for line in fp.readlines():"},{"line_number":303,"context_line":"                self.assertNotEqual(-1, str(line).find(logs[count]))"},{"line_number":304,"context_line":"                count \u003d count + 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"df7087c5_64900150","line":302,"range":{"start_line":302,"start_character":24,"end_line":302,"end_character":38},"in_reply_to":"df7087c5_eeac03f0","updated":"2018-03-19 10:53:33.000000000","message":"Done","commit_id":"45af2b9e8d910fe586b1b483410d6ac69a21165a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"8c88e03d58fd9942ff298ea17fb8c9b841b9dcb3","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        with capture(set_ovs_hostconfigs.main, args\u003d()) as output:"},{"line_number":294,"context_line":"            self.assertNotEqual(-1, output.find(LOGGING_PERMISSION_REQUIRED))"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def test_log_in_file(self):"},{"line_number":297,"context_line":"        # TODO(poothia): make test cases idempotent"},{"line_number":298,"context_line":"        with tempfile.NamedTemporaryFile(delete\u003dTrue) as fp:"},{"line_number":299,"context_line":"            set_ovs_hostconfigs.main((\"--log-file\u003d%s\" % fp.name,))"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf659307_bad36938","line":296,"updated":"2018-03-27 06:58:48.000000000","message":"Save the value of the logger before starting the test and a add a cleanup that will run after the test is done to restore the logger as it was. This will be a workaround until you refactor this whole TestCase to be idempotent.","commit_id":"3886e9fac5ca8f6106c42dccef380657a8def2df"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"d7f385fbb0ad3d2e79c6417f2feb1d9dc0342f3c","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            logs \u003d [LOGGING_ENABLED, LOGGING_PERMISSION_REQUIRED]"},{"line_number":301,"context_line":"            for count, line in enumerate(fp.readlines()):"},{"line_number":302,"context_line":"                self.assertNotEqual(-1, str(line).find(logs[count]))"},{"line_number":303,"context_line":"            # Logger Object Cleanup"},{"line_number":304,"context_line":"            set_ovs_hostconfigs.main((\"--log-file\u003d%s\" % None,))"}],"source_content_type":"text/x-python","patch_set":13,"id":"bf659307_dd856208","line":304,"range":{"start_line":303,"start_character":12,"end_line":304,"end_character":63},"updated":"2018-04-03 10:56:21.000000000","message":"1) if it\u0027s a cleanup then better to use self.addCleanup() so it gets executed no matter what.\n\n2) Passing None doesn\u0027t necessarily guarantees that you are returning it\u0027s state to the previous it had before starting the test. Thus idempotence is not guaranteed.","commit_id":"4041273c926b41b79f857303c42ead2e4b92421e"}]}
