)]}'
{"nova/test.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9e7d81f2ebedd3bf7146bc4e6d87049a33a7c2b7","unresolved":false,"context_lines":[{"line_number":871,"context_line":"        @mock.patch(six.moves.builtins, \u0027open\u0027)"},{"line_number":872,"context_line":"        def test_my_code(self, mock_open):"},{"line_number":873,"context_line":"            ..."},{"line_number":874,"context_line":"            mock_open.assert_called_once_with(path)"},{"line_number":875,"context_line":"    \"\"\""},{"line_number":876,"context_line":"    real_open \u003d builtins.open"},{"line_number":877,"context_line":"    m \u003d mock.mock_open(read_data\u003dread_data)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bfb3d3c7_716923f7","line":874,"updated":"2019-05-28 10:50:34.000000000","message":"Lovely docs here.","commit_id":"ca8f4be2a84d37319183cf9511d1791068a2e2fd"}],"nova/tests/unit/test_test.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9d00ea3d48627f74999c2f4682bbd53693bb5e1e","unresolved":false,"context_lines":[{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        # Test we can still create, write to, and then read from a"},{"line_number":404,"context_line":"        # temporary file, from within the same context."},{"line_number":405,"context_line":"        fd, tmp_name \u003d tempfile.mkstemp()"},{"line_number":406,"context_line":"        tmp_contents \u003d str(uuid.uuid1())"},{"line_number":407,"context_line":"        with open(tmp_name, \u0027w\u0027) as f:"},{"line_number":408,"context_line":"            f.write(tmp_contents)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_cd1099ab","line":405,"range":{"start_line":405,"start_character":23,"end_line":405,"end_character":41},"updated":"2019-05-24 13:44:38.000000000","message":"There\u0027s a way to use tempfile where it automatically cleans itself up when the process exits.\n\nIf you don\u0027t want to do that, then you should use a self.addCleanup to make sure the temp file gets removed even if the test fails.","commit_id":"d5ccef2b80836823daa5739c82086db3ac18bcf2"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"026eac3290fef713e72f04050ad825f2289e0b69","unresolved":false,"context_lines":[{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        # Test we can still create, write to, and then read from a"},{"line_number":404,"context_line":"        # temporary file, from within the same context."},{"line_number":405,"context_line":"        fd, tmp_name \u003d tempfile.mkstemp()"},{"line_number":406,"context_line":"        tmp_contents \u003d str(uuid.uuid1())"},{"line_number":407,"context_line":"        with open(tmp_name, \u0027w\u0027) as f:"},{"line_number":408,"context_line":"            f.write(tmp_contents)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_dff59cee","line":405,"range":{"start_line":405,"start_character":23,"end_line":405,"end_character":41},"in_reply_to":"bfb3d3c7_cd1099ab","updated":"2019-05-24 14:59:19.000000000","message":"\u003e There\u0027s a way to use tempfile where it automatically cleans itself\n \u003e up when the process exits.\n\nI looked for that but couldn\u0027t find it.  Looking again, maybe it\u0027s NamedTemporaryFile I missed?\n\n \u003e If you don\u0027t want to do that, then you should use a self.addCleanup\n \u003e to make sure the temp file gets removed even if the test fails.\n\nOh yeah, good idea.","commit_id":"d5ccef2b80836823daa5739c82086db3ac18bcf2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9d00ea3d48627f74999c2f4682bbd53693bb5e1e","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        with open(tmp_name, \u0027w\u0027) as f:"},{"line_number":408,"context_line":"            f.write(tmp_contents)"},{"line_number":409,"context_line":"        with open(tmp_name) as f:"},{"line_number":410,"context_line":"            self.assertEqual(tmp_contents, \"\".join(f.readlines()))"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        return tmp_name"},{"line_number":413,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_6dfbad78","line":410,"range":{"start_line":410,"start_character":43,"end_line":410,"end_character":64},"updated":"2019-05-24 13:44:38.000000000","message":"or f.read() ?","commit_id":"d5ccef2b80836823daa5739c82086db3ac18bcf2"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"026eac3290fef713e72f04050ad825f2289e0b69","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        with open(tmp_name, \u0027w\u0027) as f:"},{"line_number":408,"context_line":"            f.write(tmp_contents)"},{"line_number":409,"context_line":"        with open(tmp_name) as f:"},{"line_number":410,"context_line":"            self.assertEqual(tmp_contents, \"\".join(f.readlines()))"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        return tmp_name"},{"line_number":413,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_a2268f14","line":410,"range":{"start_line":410,"start_character":43,"end_line":410,"end_character":64},"in_reply_to":"bfb3d3c7_6dfbad78","updated":"2019-05-24 14:59:19.000000000","message":"Yeah, changed this to f.read() in the previous patch and forgot to in this one.","commit_id":"d5ccef2b80836823daa5739c82086db3ac18bcf2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"73a96616eb72acf06c49b673aa27796c190e6ed6","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            this_file_contents \u003d f.read()"},{"line_number":398,"context_line":"            self.assertIn(\"class %s(\" % self.__class__.__name__,"},{"line_number":399,"context_line":"                          this_file_contents)"},{"line_number":400,"context_line":"            self.assertNotIn(\"magic concatenated\" \"string\","},{"line_number":401,"context_line":"                             this_file_contents)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        # Test we can still create, write to, and then read from a"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_98117a55","line":400,"range":{"start_line":400,"start_character":29,"end_line":400,"end_character":58},"updated":"2019-05-24 15:55:53.000000000","message":"clever :)","commit_id":"a808f9e2a76dd6d10816ac8b6cd77f9e1f683e32"}],"nova/tests/unit/test_versions.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9d00ea3d48627f74999c2f4682bbd53693bb5e1e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    @test.patch_open(\"/etc/nova/release\", \"\"\"[Nova]"},{"line_number":34,"context_line":"vendor \u003d ACME Corporation"},{"line_number":35,"context_line":"product \u003d ACME Nova"},{"line_number":36,"context_line":"package \u003d 1337\"\"\")"},{"line_number":37,"context_line":"    def test_release_file(self):"},{"line_number":38,"context_line":"        version.loaded \u003d False"},{"line_number":39,"context_line":"        real_find_file \u003d cfg.CONF.find_file"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_4d1ca9c0","line":36,"updated":"2019-05-24 13:44:38.000000000","message":"this doesn\u0027t seem to be working on py27","commit_id":"d5ccef2b80836823daa5739c82086db3ac18bcf2"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"026eac3290fef713e72f04050ad825f2289e0b69","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    @test.patch_open(\"/etc/nova/release\", \"\"\"[Nova]"},{"line_number":34,"context_line":"vendor \u003d ACME Corporation"},{"line_number":35,"context_line":"product \u003d ACME Nova"},{"line_number":36,"context_line":"package \u003d 1337\"\"\")"},{"line_number":37,"context_line":"    def test_release_file(self):"},{"line_number":38,"context_line":"        version.loaded \u003d False"},{"line_number":39,"context_line":"        real_find_file \u003d cfg.CONF.find_file"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_621c17c1","line":36,"in_reply_to":"bfb3d3c7_4d1ca9c0","updated":"2019-05-24 14:59:19.000000000","message":"Weird, I\u0027ll take a look.","commit_id":"d5ccef2b80836823daa5739c82086db3ac18bcf2"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"3de4e6db9e4270da8a15f909b09aa89afca8db7b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"vendor \u003d ACME Corporation"},{"line_number":49,"context_line":"product \u003d ACME Nova"},{"line_number":50,"context_line":"package \u003d 1337\"\"\""},{"line_number":51,"context_line":"                return six.StringIO(data)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            return real_open(path, *args, **kwargs)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_e93d4add","side":"PARENT","line":51,"updated":"2019-05-24 20:19:21.000000000","message":"Ditching this use of StringIO is the bit causing lower-constraints to fail.","commit_id":"f0edbff6f2d5f1c6dc5c6e0b63eeba3d1d8057bb"}]}
