コード例 #1
0
  def __init__(self, name):
    """Initializes a COPR manager.

    Args:
      name (str): name of the group.
    """
    super(COPRProjectManager, self).__init__()
    self._download_helper = download_helper.DownloadHelper('')
    self._name = name
コード例 #2
0
  def __init__(self, name):
    """Initializes a Launchpad PPA manager.

    Args:
      name (str): name of the PPA.
    """
    super(LaunchpadPPAManager, self).__init__()
    self._download_helper = download_helper.DownloadHelper('')
    self._name = name
コード例 #3
0
ファイル: manage.py プロジェクト: pombredanne/l2tdevtools
    def __init__(self, name):
        """Initializes the Launchpad PPA manager object.

    Args:
      name: a string containing the name of the PPA.
    """
        super(LaunchpadPPAManager, self).__init__()
        self._download_helper = download_helper.DownloadHelper(u'')
        self._name = name
コード例 #4
0
    def testDownloadPageContent(self):
        """Tests the DownloadPageContent functions."""
        download_helper_object = download_helper.DownloadHelper('')

        page_content = download_helper_object.DownloadPageContent(
            self._download_url)

        expected_page_content = b''
        with open(self._FILENAME, 'rb') as file_object:
            expected_page_content = file_object.read()

        self.assertEqual(page_content, expected_page_content)
コード例 #5
0
    def testDownloadFile(self):
        """Tests the DownloadFile functions."""
        download_helper_object = download_helper.DownloadHelper(
            self._download_url)

        current_working_directory = os.getcwd()

        page_content = b''
        with TempDirectory() as temporary_directory:
            os.chdir(temporary_directory)
            filename = download_helper_object.DownloadFile(self._download_url)

            with open(filename, 'rb') as file_object:
                page_content = file_object.read()

        os.chdir(current_working_directory)

        expected_page_content = b''
        with open(self._FILENAME, 'rb') as file_object:
            expected_page_content = file_object.read()

        self.assertEqual(page_content, expected_page_content)
コード例 #6
0
 def __init__(self):
   """Initializes a PyPI manager object."""
   super(PyPIManager, self).__init__()
   self._download_helper = download_helper.DownloadHelper('')
コード例 #7
0
 def __init__(self):
   """Initializes a github repository manager."""
   super(GithubRepoManager, self).__init__()
   self._download_helper = download_helper.DownloadHelper('')
コード例 #8
0
ファイル: manage.py プロジェクト: pombredanne/l2tdevtools
 def __init__(self):
     """Initializes the github reposistory manager object."""
     super(GithubRepoManager, self).__init__()
     self._download_helper = download_helper.DownloadHelper(u'')