)]}'
{"neutron/tests/unit/agent/linux/test_dhcp.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"535a8faa5560f2bb9be0b192a0a5633914b11667","unresolved":false,"context_lines":[{"line_number":1508,"context_line":""},{"line_number":1509,"context_line":"    def test_read_hosts_file_leases_with_stateless_IPv6_tag(self):"},{"line_number":1510,"context_line":"        filename \u003d \u0027/path/to/file\u0027"},{"line_number":1511,"context_line":"        with mock.patch(\u0027__builtin__.open\u0027) as mock_open:"},{"line_number":1512,"context_line":"            mock_open.return_value.__enter__ \u003d lambda s: s"},{"line_number":1513,"context_line":"            mock_open.return_value.__exit__ \u003d mock.Mock()"},{"line_number":1514,"context_line":"            lines \u003d [\"00:00:80:aa:bb:cc,id:client1,inst-name,192.168.0.1\","}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_f2ebbf76","line":1511,"updated":"2015-06-16 07:59:13.000000000","message":"Why not using a temporary file instead of mocking low level i/o operations? We should not really rely on the fact that e.g. readlines() is called in that function. What we are interested is that leases returned are correct.\n\nNote there is a util method in BaseTestCase to generate temporary file names: self.get_temp_file_path()","commit_id":"c6344fcaec5c42457a1180bea51bc01364edb9db"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"633c67775ab945131ddb0edb31a72dcf6a7776f2","unresolved":false,"context_lines":[{"line_number":1506,"context_line":"                               \u0027client2\u0027)]), leases)"},{"line_number":1507,"context_line":"        mock_open.assert_called_once_with(filename)"},{"line_number":1508,"context_line":""},{"line_number":1509,"context_line":"    def test_read_hosts_file_leases_with_stateless_IPv6_tag(self):"},{"line_number":1510,"context_line":"        filename \u003d self.get_temp_file_path(\u0027leases\u0027)"},{"line_number":1511,"context_line":"        with open(filename, \"w\") as leasesfile:"},{"line_number":1512,"context_line":"            lines \u003d ["}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_bb16e749","line":1509,"updated":"2015-06-18 17:43:57.000000000","message":"Nit: ipv6 should be lowercase","commit_id":"cdde9a3aeb929e80aa3c251a44060b8174ab7b6c"}]}
