Commit 7a378511 authored by Meet Mangukiya's avatar Meet Mangukiya

test_gitlab_merge_request: Record diffstat request

parent ead94bff
Pipeline #8902565 passed with stage
in 3 minutes and 34 seconds
interactions:
- request:
body: null
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
User-Agent: [python-requests/2.17.3]
method: GET
uri: https://gitlab.com/api/v4/projects/gitmate-test-user%2Ftest/merge_requests/7/changes?User-Agent=GitMate
response:
body: {string: '{"id":3761791,"iid":7,"project_id":3439658,"title":"Update README.md","description":"","state":"reopened","created_at":"2017-06-07T12:01:20.476Z","updated_at":"2017-06-09T09:49:07.691Z","target_branch":"master","source_branch":"gitmate-test-user-patch-2","upvotes":0,"downvotes":0,"author":{"name":"Naveen
Kumar Sangi","username":"nkprince007","id":889700,"state":"active","avatar_url":"https://gitlab.com/uploads/system/user/avatar/889700/avatar.png","web_url":"https://gitlab.com/nkprince007"},"assignee":null,"source_project_id":3439658,"target_project_id":3439658,"labels":[],"work_in_progress":false,"milestone":null,"merge_when_pipeline_succeeds":false,"merge_status":"unchecked","sha":"f6d2b7c66372236a090a2a74df2e47f42a54456b","merge_commit_sha":null,"user_notes_count":11,"approvals_before_merge":null,"should_remove_source_branch":null,"force_remove_source_branch":null,"squash":false,"web_url":"https://gitlab.com/gitmate-test-user/test/merge_requests/7","subscribed":false,"changes":[{"old_path":"README.md","new_path":"README.md","a_mode":"100644","b_mode":"100644","diff":"---
a/README.md\n+++ b/README.md\n@@ -1,2 +1,4 @@\n # test\n a test repo\n+\n+a
commiit that can one acknowledge\n","new_file":false,"renamed_file":false,"deleted_file":false}]}'}
headers:
Cache-Control: ['max-age=0, private, must-revalidate']
Content-Length: ['1264']
Content-Type: [application/json]
Date: ['Fri, 09 Jun 2017 18:32:18 GMT']
Etag: [W/"4c6a0388ae0cc2775c044914bb27f05b"]
Server: [nginx]
Strict-Transport-Security: [max-age=31536000]
Vary: [Origin]
X-Frame-Options: [SAMEORIGIN]
X-Request-Id: [7a6ca44b-2a5b-4ea9-856d-7e96fc0cc956]
X-Runtime: ['0.493401']
status: {code: 200, message: OK}
version: 1
......@@ -45,6 +45,7 @@ class TestGitLabMergeRequest(unittest.TestCase):
self.assertEqual(self.mr.repository.full_name,
'gitmate-test-user/test')
@my_vcr.use_cassette('tests/GitLab/cassettes/gitlab_merge_request_diffstat.yaml')
def test_diffstat(self):
self.assertEqual(self.mr.diffstat, (2, 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment