diff options
| author | John L. Villalovos <john@sodarock.com> | 2022-01-03 22:40:09 -0800 |
|---|---|---|
| committer | John L. Villalovos <john@sodarock.com> | 2022-01-03 22:40:09 -0800 |
| commit | a92b55b81eb3586e4144f9332796c94747bf9cfe (patch) | |
| tree | e4a71de4b44b1319c34ddaf921c6698701fa938f | |
| parent | c6d7e9aaddda2f39262b695bb98ea4d90575fcce (diff) | |
| download | gitlab-jlvillal/test_1425.tar.gz | |
chore: add functional test of mergerequest.get()jlvillal/test_1425
Add a functional test of test mergerequest.get() and
mergerequest.get(..., lazy=True)
Closes: #1425
| -rw-r--r-- | tests/functional/api/test_merge_requests.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/functional/api/test_merge_requests.py b/tests/functional/api/test_merge_requests.py index a814572..f92e30d 100644 --- a/tests/functional/api/test_merge_requests.py +++ b/tests/functional/api/test_merge_requests.py @@ -32,6 +32,22 @@ def test_merge_requests(project): ) +def test_merge_requests_get(project, merge_request): + new_mr = merge_request(source_branch="test_get") + mr_iid = new_mr.iid + mr = project.mergerequests.get(mr_iid) + assert mr.iid == mr_iid + mr = project.mergerequests.get(str(mr_iid)) + assert mr.iid == mr_iid + + +def test_merge_requests_get_lazy(project, merge_request): + new_mr = merge_request(source_branch="test_get") + mr_iid = new_mr.iid + mr = project.mergerequests.get(mr_iid, lazy=True) + assert mr.iid == mr_iid + + def test_merge_request_discussion(project): mr = project.mergerequests.list()[0] size = len(mr.discussions.list()) |
