예제 #1
0
    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)
예제 #2
0
  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)
예제 #3
0
  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)
예제 #4
0
  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)