)]}'
{"vif_plug_ovs/tests/unit/test_linux_net.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"109280c57c4b990eb6f98d5216b369003869dca9","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        mock_open.assert_called_once_with(exists_path, \u0027w\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open(read_data\u003dmock.Mock())"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_9af7f559","line":83,"range":{"start_line":83,"start_character":4,"end_line":83,"end_character":40},"updated":"2019-05-29 15:03:24.000000000","message":"This seems like a very bad idea and is why mock_open exists:\n\nhttps://docs.python.org/3/library/unittest.mock.html#mock-open\n\nGiven this is a backport I won\u0027t -1 on it, but this is probably something that should be cleaned up on master before it causes a problem.","commit_id":"c42e7641f00905ff2dd68096d733929bf84756b5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"8ed630fbb43c1bbfbf3ff3cdef158b4c29210d1c","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        mock_open.assert_called_once_with(exists_path, \u0027w\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":83,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027)"},{"line_number":84,"context_line":"    def test__arp_filtering(self, mock_open, *args):"},{"line_number":85,"context_line":"        mock_open.side_effect \u003d mock.mock_open(read_data\u003dmock.Mock())"},{"line_number":86,"context_line":"        linux_net._arp_filtering(\"br0\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_759d7264","line":83,"range":{"start_line":83,"start_character":4,"end_line":83,"end_character":40},"in_reply_to":"bfb3d3c7_9af7f559","updated":"2019-05-29 15:21:14.000000000","message":"That\u0027s what I\u0027m doing: replacing sys.open (but using six.builtins to avoid version problems) with mock_open. The same as in [1] and the link provided.\n\n[1] https://review.opendev.org/#/c/661266/2/nova/test.py@876","commit_id":"c42e7641f00905ff2dd68096d733929bf84756b5"}]}
