| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 51d8f88 commit d065275
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -911,7 +911,9 @@ class ParticipantsMixin(_RestObjectBase): | |||
| 911 | 911 | ||
| 912 | 912 | @cli.register_custom_action(cls_names=("ProjectMergeRequest", "ProjectIssue")) | |
| 913 | 913 | @exc.on_http_error(exc.GitlabListError) | |
| 914 | - def participants(self, **kwargs: Any) -> Dict[str, Any]: | ||
| 914 | + def participants( | ||
| 915 | + self, **kwargs: Any | ||
| 916 | + ) -> Union[gitlab.client.GitlabList, List[Dict[str, Any]]]: | ||
| 915 | 917 | """List the participants. | |
| 916 | 918 | ||
| 917 | 919 | Args: | |
@@ -929,7 +931,7 @@ def participants(self, **kwargs: Any) -> Dict[str, Any]: | |||
| 929 | 931 | """ | |
| 930 | 932 | ||
| 931 | 933 | path = f"{self.manager.path}/{self.encoded_id}/participants" | |
| 932 | - result = self.manager.gitlab.http_get(path, **kwargs) | ||
| 934 | + result = self.manager.gitlab.http_list(path, **kwargs) | ||
| 933 | 935 | if TYPE_CHECKING: | |
| 934 | 936 | assert not isinstance(result, requests.Response) | |
| 935 | 937 | return result | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,7 +18,9 @@ def test_create_issue(project): | |||
| 18 | 18 | assert issue in project.issues.list(state="opened") | |
| 19 | 19 | assert issue2 in project.issues.list(state="closed") | |
| 20 | 20 | ||
| 21 | - assert issue.participants() | ||
| 21 | + participants = issue.participants() | ||
| 22 | + assert participants | ||
| 23 | + assert isinstance(participants, list) | ||
| 22 | 24 | assert type(issue.closed_by()) == list | |
| 23 | 25 | assert type(issue.related_merge_requests()) == list | |
| 24 | 26 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -104,7 +104,9 @@ def test_merge_request_basic(project): | |||
| 104 | 104 | # basic testing: only make sure that the methods exist | |
| 105 | 105 | mr.commits() | |
| 106 | 106 | mr.changes() | |
| 107 | - assert mr.participants() | ||
| 107 | + participants = mr.participants() | ||
| 108 | + assert participants | ||
| 109 | + assert isinstance(participants, list) | ||
| 108 | 110 | ||
| 109 | 111 | ||
| 110 | 112 | def test_merge_request_rebase(project): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments