def testTriggerBuild(self): """Tests the TriggerBuild function.""" helper = readthedocs.ReadTheDocsHelper(project='test') helper._url_lib_helper = test_lib.TestURLLibHelper() result = helper.TriggerBuild() self.assertTrue(result)
def testQueryUser(self): """Tests the QueryUser function.""" helper = github.GitHubHelper( organization='test', project='test_project') helper._url_lib_helper = test_lib.TestURLLibHelper() result = helper.QueryUser('test_user') self.assertIsNone(result)
def testCreatePullRequest(self): """Tests the CreatePullRequest function.""" helper = github.GitHubHelper( organization='test', project='test_project') helper._url_lib_helper = test_lib.TestURLLibHelper() result = helper.CreatePullRequest('TOKEN', 'origin', 'title', 'body') self.assertTrue(result)
def testGetForkGitRepoUrl(self): """Tests the GetForkGitRepoUrl function.""" helper = github.GitHubHelper( organization='test', project='test_project') helper._url_lib_helper = test_lib.TestURLLibHelper() expected_url = u'https://github.com/test_user/test_project.git' url = helper.GetForkGitRepoUrl('test_user') self.assertEqual(url, expected_url)