Ejemplo n.º 1
0
    def commit_queue_for_project(self, project_id: str) -> CommitQueue:
        """
        Get the current commit queue for the specified project.

        :param project_id: Id of project to query.
        :return: Current commit queue for project.
        """
        url = self._create_url(f"/commit_queue/{project_id}")
        return CommitQueue(self._paginate(url), self)  # type: ignore[arg-type]
Ejemplo n.º 2
0
    def commit_queue_for_project(self, project_id):
        """
        Get the current commit queue for the specified project.

        :param project_id: Id of project to query.
        :return: Current commit queue for project.
        """
        url = self._create_url(
            '/commit_queue/{project_id}'.format(project_id=project_id))
        return CommitQueue(self._paginate(url), self)
Ejemplo n.º 3
0
 def test_get_attributes(self, sample_commit_queue):
     commit_queue = CommitQueue(sample_commit_queue, None)
     assert commit_queue.queue_id == sample_commit_queue['queue_id']
     assert commit_queue.queue[0].issue == sample_commit_queue['queue'][0][
         'issue']
Ejemplo n.º 4
0
 def test_empty_queue(self, sample_commit_queue):
     sample_commit_queue['queue'] = None
     commit_queue = CommitQueue(sample_commit_queue, None)
     assert len(commit_queue.queue) == 0
Ejemplo n.º 5
0
 def test_get_attributes(self, sample_commit_queue):
     commit_queue = CommitQueue(sample_commit_queue, None)
     assert commit_queue.queue_id == sample_commit_queue["queue_id"]
     assert commit_queue.queue[0].issue == sample_commit_queue["queue"][0][
         "issue"]