def callback_repo_check(self, request, uri, headers, status_code=404):
        self.assertEqual(
            request.headers['Authorization'],
            'token {0}'.format(self.OAUTH2_TOKEN)
        )
        # Handle the new "rerun" repo differently
        if self.TEST_RERUN_REPO in uri:
            status_code = 404
        return (status_code, headers, json.dumps({'message': 'testing'}))
Handle mocked API request for repo existence check.
dataset/ETHPy150Open mitodl/orcoursetrion/orcoursetrion/tests/base.py/TestGithubBase.callback_repo_check