'Test invalid git repos'

def test_bad_git_repos(self):

    test_repo_path = '{}/test_repo'.format(git_export_utils.GIT_REPO_EXPORT_DIR)
    self.assertFalse(os.path.isdir(test_repo_path))
    course_key = CourseLocator('foo', 'blah', '100-')
    with self.assertRaisesRegexp(GitExportError, unicode(GitExportError.CANNOT_PULL)):
        git_export_utils.export_to_git(course_key, 'https://user:blah@example.com/test_repo.git')
    self.assertFalse(os.path.isdir(test_repo_path))
    with self.assertRaisesRegexp(GitExportError, unicode(GitExportError.XML_EXPORT_FAIL)):
        git_export_utils.export_to_git(course_key, 'file://{0}'.format(self.bare_repo_dir))
    with self.assertRaisesRegexp(GitExportError, unicode(GitExportError.CANNOT_PULL)):
        git_export_utils.export_to_git(course_key, 'https://user:blah@example.com/r.git')
