)]}'
{"jenkins/__init__.py":[{"author":{"_account_id":19316,"name":"Eduardo Gonzalez","email":"dabarren@gmail.com","username":"egonzalez90"},"change_message_id":"714342ec3bcbc0a760979f4e95c206cbc78a6742","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        \u0027\u0027\u0027Get build environment variables."},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        :param name: Job name, ``str``"},{"line_number":648,"context_line":"        :param name: Build number, ``int``"},{"line_number":649,"context_line":"        :param depth: JSON depth, ``int``"},{"line_number":650,"context_line":"        :returns: dictionary of build env vars, ``dict``"},{"line_number":651,"context_line":"        \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_d6f9f1c7","line":648,"range":{"start_line":648,"start_character":15,"end_line":648,"end_character":19},"updated":"2018-04-23 10:16:06.000000000","message":"number","commit_id":"f8e291feffe351728defdcab94c6b0337890bfc0"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"8d17ffcbdc97b9e9a25e16419a97bd258424fc5c","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        \u0027\u0027\u0027Get build environment variables."},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        :param name: Job name, ``str``"},{"line_number":648,"context_line":"        :param name: Build number, ``int``"},{"line_number":649,"context_line":"        :param depth: JSON depth, ``int``"},{"line_number":650,"context_line":"        :returns: dictionary of build env vars, ``dict``"},{"line_number":651,"context_line":"        \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_b6423daa","line":648,"range":{"start_line":648,"start_character":15,"end_line":648,"end_character":19},"in_reply_to":"9f6a8fd7_d6f9f1c7","updated":"2018-04-23 10:25:47.000000000","message":"Done","commit_id":"f8e291feffe351728defdcab94c6b0337890bfc0"},{"author":{"_account_id":19316,"name":"Eduardo Gonzalez","email":"dabarren@gmail.com","username":"egonzalez90"},"change_message_id":"714342ec3bcbc0a760979f4e95c206cbc78a6742","unresolved":false,"context_lines":[{"line_number":670,"context_line":"        \u0027\u0027\u0027Get test results report."},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        :param name: Job name, ``str``"},{"line_number":673,"context_line":"        :param name: Build number, ``int``"},{"line_number":674,"context_line":"        :returns: dictionary of test report results, ``dict``"},{"line_number":675,"context_line":"        \u0027\u0027\u0027"},{"line_number":676,"context_line":"        folder_url, short_name \u003d self._get_job_folder(name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_b6155de7","line":673,"range":{"start_line":673,"start_character":15,"end_line":673,"end_character":19},"updated":"2018-04-23 10:16:06.000000000","message":"number","commit_id":"f8e291feffe351728defdcab94c6b0337890bfc0"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"8d17ffcbdc97b9e9a25e16419a97bd258424fc5c","unresolved":false,"context_lines":[{"line_number":670,"context_line":"        \u0027\u0027\u0027Get test results report."},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        :param name: Job name, ``str``"},{"line_number":673,"context_line":"        :param name: Build number, ``int``"},{"line_number":674,"context_line":"        :returns: dictionary of test report results, ``dict``"},{"line_number":675,"context_line":"        \u0027\u0027\u0027"},{"line_number":676,"context_line":"        folder_url, short_name \u003d self._get_job_folder(name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_5615e19a","line":673,"range":{"start_line":673,"start_character":15,"end_line":673,"end_character":19},"in_reply_to":"9f6a8fd7_b6155de7","updated":"2018-04-23 10:25:47.000000000","message":"Done","commit_id":"f8e291feffe351728defdcab94c6b0337890bfc0"},{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"37aac373fe03a2ec33d92a7ce434c2eb5fd32717","unresolved":false,"context_lines":[{"line_number":663,"context_line":"            raise JenkinsException("},{"line_number":664,"context_line":"                \u0027Could not parse JSON info for job[%s] number[%d]\u0027 % (name, number))"},{"line_number":665,"context_line":"        except NotFoundException as e:"},{"line_number":666,"context_line":"            # This can happen on workflow jobs, or if InjectEnvVars plugin not installed"},{"line_number":667,"context_line":"            return None"},{"line_number":668,"context_line":""},{"line_number":669,"context_line":"    def get_build_test_report(self, name, number, depth\u003d0):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_91d270d0","line":666,"range":{"start_line":666,"start_character":12,"end_line":666,"end_character":88},"updated":"2018-04-25 08:31:58.000000000","message":"might be worth adding this as a return value to the function description, maybe a note to explain to users reading docs that this will return None in certain cases.\n\nSame for the method below, we should improve all of them to indicate what exceptions can be thrown and why, but maybe lets just start here with highlighting that plugins may be required to be installed for these calls to work.","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"81c093d14dfe3fc61dc4fa86e1ab63ad02def6a5","unresolved":false,"context_lines":[{"line_number":663,"context_line":"            raise JenkinsException("},{"line_number":664,"context_line":"                \u0027Could not parse JSON info for job[%s] number[%d]\u0027 % (name, number))"},{"line_number":665,"context_line":"        except NotFoundException as e:"},{"line_number":666,"context_line":"            # This can happen on workflow jobs, or if InjectEnvVars plugin not installed"},{"line_number":667,"context_line":"            return None"},{"line_number":668,"context_line":""},{"line_number":669,"context_line":"    def get_build_test_report(self, name, number, depth\u003d0):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_c0a330b1","line":666,"range":{"start_line":666,"start_character":12,"end_line":666,"end_character":88},"in_reply_to":"9f6a8fd7_91d270d0","updated":"2018-04-25 12:02:49.000000000","message":"Done","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"}],"tests/test_build.py":[{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"37aac373fe03a2ec33d92a7ce434c2eb5fd32717","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @patch(\u0027jenkins.requests.Session.send\u0027)"},{"line_number":69,"context_line":"    def test_raise_HTTPError(self, session_send_mock):"},{"line_number":70,"context_line":"        session_send_mock.side_effect \u003d iter(["},{"line_number":71,"context_line":"            build_response_mock(404, reason\u003d\"Not Found\"),  # crumb"},{"line_number":72,"context_line":"            build_response_mock(404, reason\u003d\"Not Found\"),  # request"},{"line_number":73,"context_line":"        ])"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        with self.assertRaises(jenkins.JenkinsException) as context_manager:"},{"line_number":76,"context_line":"            self.j.get_build_console_output(u\u0027TestJob\u0027, number\u003d52)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_543e06b8","line":73,"range":{"start_line":70,"start_character":8,"end_line":73,"end_character":10},"updated":"2018-04-25 08:31:58.000000000","message":"Does this approach of using build_response_mock not work for building the exceptions below?","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"81c093d14dfe3fc61dc4fa86e1ab63ad02def6a5","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @patch(\u0027jenkins.requests.Session.send\u0027)"},{"line_number":69,"context_line":"    def test_raise_HTTPError(self, session_send_mock):"},{"line_number":70,"context_line":"        session_send_mock.side_effect \u003d iter(["},{"line_number":71,"context_line":"            build_response_mock(404, reason\u003d\"Not Found\"),  # crumb"},{"line_number":72,"context_line":"            build_response_mock(404, reason\u003d\"Not Found\"),  # request"},{"line_number":73,"context_line":"        ])"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        with self.assertRaises(jenkins.JenkinsException) as context_manager:"},{"line_number":76,"context_line":"            self.j.get_build_console_output(u\u0027TestJob\u0027, number\u003d52)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_80cf7827","line":73,"range":{"start_line":70,"start_character":8,"end_line":73,"end_character":10},"in_reply_to":"9f6a8fd7_543e06b8","updated":"2018-04-25 12:02:49.000000000","message":"It probably would, it would just need rewriting to do so.","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"37aac373fe03a2ec33d92a7ce434c2eb5fd32717","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"class JenkinsBuildMiscUrlTest(JenkinsTestBase):"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    @parameterized.expand([\u0027get_build_env_vars\u0027, \u0027get_build_test_report\u0027])"},{"line_number":531,"context_line":"    def test_url_missing(self, param):"},{"line_number":532,"context_line":"        with patch(\u0027jenkins.Jenkins.jenkins_open\u0027) as mock_open:"},{"line_number":533,"context_line":"            mock_open.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_51aff828","line":530,"range":{"start_line":530,"start_character":5,"end_line":530,"end_character":25},"updated":"2018-04-25 08:31:58.000000000","message":"parameterized.expand looks like testscenarios.multiply_scenarios or even just how TestWithScenarios class is expected to work? Or is there something different about how parameterized.expand works. Seeing how we already have testscenarios included and are using the TestWithScenarios class as a super class of JenkinsTestBase I\u0027m just wondering if we really need another dependency to do the same thing?","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"81c093d14dfe3fc61dc4fa86e1ab63ad02def6a5","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"class JenkinsBuildMiscUrlTest(JenkinsTestBase):"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    @parameterized.expand([\u0027get_build_env_vars\u0027, \u0027get_build_test_report\u0027])"},{"line_number":531,"context_line":"    def test_url_missing(self, param):"},{"line_number":532,"context_line":"        with patch(\u0027jenkins.Jenkins.jenkins_open\u0027) as mock_open:"},{"line_number":533,"context_line":"            mock_open.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_a084fcd3","line":530,"range":{"start_line":530,"start_character":5,"end_line":530,"end_character":25},"in_reply_to":"9f6a8fd7_51aff828","updated":"2018-04-25 12:02:49.000000000","message":"I can look at testscenarios.","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"5679c7e20d73d03b3ea93a5ada4415b834f0f3da","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"class JenkinsBuildMiscUrlTest(JenkinsTestBase):"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    @parameterized.expand([\u0027get_build_env_vars\u0027, \u0027get_build_test_report\u0027])"},{"line_number":531,"context_line":"    def test_url_missing(self, param):"},{"line_number":532,"context_line":"        with patch(\u0027jenkins.Jenkins.jenkins_open\u0027) as mock_open:"},{"line_number":533,"context_line":"            mock_open.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_435de544","line":530,"range":{"start_line":530,"start_character":5,"end_line":530,"end_character":25},"in_reply_to":"9f6a8fd7_8039b8f2","updated":"2018-04-25 16:02:16.000000000","message":"Probably just because no one has gotten around to it yet, various changes have tidied up a lot of the differences that used to exist, but there\u0027s a bit of effort in just working out the last step in providing a couple of common test methods that can be expanded out with a few options on all of the test classes.","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"5b0f0cc8dcc4e3c781ffaf3e46374db67602fb6e","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"class JenkinsBuildMiscUrlTest(JenkinsTestBase):"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    @parameterized.expand([\u0027get_build_env_vars\u0027, \u0027get_build_test_report\u0027])"},{"line_number":531,"context_line":"    def test_url_missing(self, param):"},{"line_number":532,"context_line":"        with patch(\u0027jenkins.Jenkins.jenkins_open\u0027) as mock_open:"},{"line_number":533,"context_line":"            mock_open.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_8039b8f2","line":530,"range":{"start_line":530,"start_character":5,"end_line":530,"end_character":25},"in_reply_to":"9f6a8fd7_a084fcd3","updated":"2018-04-25 12:06:07.000000000","message":"Actually - can you tell me why testscenarios isn\u0027t in use for the majority of the tests contained herein?  Every class herein is basically a copy/paste with a calling function change in the middle (for negative tests)","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"37aac373fe03a2ec33d92a7ce434c2eb5fd32717","unresolved":false,"context_lines":[{"line_number":535,"context_line":"            self.assertRaises(jenkins.JenkinsException, func, \u0027job_name\u0027, 1)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    @parameterized.expand([\u0027get_build_env_vars\u0027, \u0027get_build_test_report\u0027])"},{"line_number":538,"context_line":"    def test_url_http(self, param):"},{"line_number":539,"context_line":"        with patch(\u0027jenkins.Jenkins.jenkins_open\u0027) as mock_open:"},{"line_number":540,"context_line":"            mock_open.side_effect \u003d requests.exceptions.HTTPError(\u0027url\u0027, \u0027code\u0027, \u0027msg\u0027, \u0027hdrs\u0027,"},{"line_number":541,"context_line":"                                                                  MagicMock())"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_71123c64","line":538,"range":{"start_line":538,"start_character":8,"end_line":538,"end_character":21},"updated":"2018-04-25 08:31:58.000000000","message":"Can you name these in line with the other test names, this looks like it should have \"raise_HTTPError\" in it\u0027s name. So that it\u0027s possible to see all test methods that are raising exceptions.","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"81c093d14dfe3fc61dc4fa86e1ab63ad02def6a5","unresolved":false,"context_lines":[{"line_number":535,"context_line":"            self.assertRaises(jenkins.JenkinsException, func, \u0027job_name\u0027, 1)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    @parameterized.expand([\u0027get_build_env_vars\u0027, \u0027get_build_test_report\u0027])"},{"line_number":538,"context_line":"    def test_url_http(self, param):"},{"line_number":539,"context_line":"        with patch(\u0027jenkins.Jenkins.jenkins_open\u0027) as mock_open:"},{"line_number":540,"context_line":"            mock_open.side_effect \u003d requests.exceptions.HTTPError(\u0027url\u0027, \u0027code\u0027, \u0027msg\u0027, \u0027hdrs\u0027,"},{"line_number":541,"context_line":"                                                                  MagicMock())"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_60d824ee","line":538,"range":{"start_line":538,"start_character":8,"end_line":538,"end_character":21},"in_reply_to":"9f6a8fd7_71123c64","updated":"2018-04-25 12:02:49.000000000","message":"Will do","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":1054,"name":"Darragh Bailey","email":"daragh.bailey@gmail.com","username":"dbailey-k"},"change_message_id":"37aac373fe03a2ec33d92a7ce434c2eb5fd32717","unresolved":false,"context_lines":[{"line_number":537,"context_line":"    @parameterized.expand([\u0027get_build_env_vars\u0027, \u0027get_build_test_report\u0027])"},{"line_number":538,"context_line":"    def test_url_http(self, param):"},{"line_number":539,"context_line":"        with patch(\u0027jenkins.Jenkins.jenkins_open\u0027) as mock_open:"},{"line_number":540,"context_line":"            mock_open.side_effect \u003d requests.exceptions.HTTPError(\u0027url\u0027, \u0027code\u0027, \u0027msg\u0027, \u0027hdrs\u0027,"},{"line_number":541,"context_line":"                                                                  MagicMock())"},{"line_number":542,"context_line":"            func \u003d getattr(self.j, param)"},{"line_number":543,"context_line":"            self.assertRaises(jenkins.JenkinsException, func, \u0027job_name\u0027, 1)"},{"line_number":544,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_5410464e","line":541,"range":{"start_line":540,"start_character":36,"end_line":541,"end_character":78},"updated":"2018-04-25 08:31:58.000000000","message":"Is it possible for this to use the build_response_mock as hinted at further up to trigger a raise HTTPError?","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"},{"author":{"_account_id":215,"name":"Jon-Paul Sullivan","email":"j3p0uk@hotmail.com","username":"jonpaul-sullivan"},"change_message_id":"81c093d14dfe3fc61dc4fa86e1ab63ad02def6a5","unresolved":false,"context_lines":[{"line_number":537,"context_line":"    @parameterized.expand([\u0027get_build_env_vars\u0027, \u0027get_build_test_report\u0027])"},{"line_number":538,"context_line":"    def test_url_http(self, param):"},{"line_number":539,"context_line":"        with patch(\u0027jenkins.Jenkins.jenkins_open\u0027) as mock_open:"},{"line_number":540,"context_line":"            mock_open.side_effect \u003d requests.exceptions.HTTPError(\u0027url\u0027, \u0027code\u0027, \u0027msg\u0027, \u0027hdrs\u0027,"},{"line_number":541,"context_line":"                                                                  MagicMock())"},{"line_number":542,"context_line":"            func \u003d getattr(self.j, param)"},{"line_number":543,"context_line":"            self.assertRaises(jenkins.JenkinsException, func, \u0027job_name\u0027, 1)"},{"line_number":544,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_a0a07c43","line":541,"range":{"start_line":540,"start_character":36,"end_line":541,"end_character":78},"in_reply_to":"9f6a8fd7_5410464e","updated":"2018-04-25 12:02:49.000000000","message":"Can do, would just need rewriting","commit_id":"4e6586f635581a803f53b8fcf23051e30b6fdaf6"}]}
