@httpretty.activate
    def test_get_all_bad_status(self):
        error = json.dumps({'error': 'error'})
        test_url = '{url}repos/{org}/{repo}/hooks'.format(
            url=self.URL,
            org=self.ORG,
            repo=self.TEST_REPO
        )
        self.register_hook_list(
            body=error,
            status=422
        )
        git_hub = GitHub(self.URL, self.OAUTH2_TOKEN)
        with self.assertRaisesRegexp(GitHubUnknownError, re.escape(error)):
            # pylint: disable=protected-access
            git_hub._get_all(test_url)
Test how we handle _get_all getting a bad status code
dataset/ETHPy150Open mitodl/orcoursetrion/orcoursetrion/tests/test_github.py/TestGithub.test_get_all_bad_status