Debian Codegraph @

tests/legacy/responses/commit.py

raw
1 """Fixtures."""
2 # pylint: disable=missing-docstring
3 import pytest
4
5
6 @pytest.fixture()
7 def commit_response():
8 return {
9 "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
10 "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
11 "node_id": "MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==",
12 "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
13 "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
14 "commit": {
15 "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
16 "author": {
17 "name": "Monalisa Octocat",
18 "email": "[email protected]",
19 "date": "2011-04-14T16:00:49Z",
20 },
21 "committer": {
22 "name": "Monalisa Octocat",
23 "email": "[email protected]",
24 "date": "2011-04-14T16:00:49Z",
25 },
26 "message": "Fix all the bugs",
27 "tree": {
28 "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
29 "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
30 },
31 "comment_count": 0,
32 "verification": {
33 "verified": False,
34 "reason": "unsigned",
35 "signature": None,
36 "payload": None,
37 },
38 },
39 "author": {
40 "login": "octocat",
41 "id": 1,
42 "node_id": "MDQ6VXNlcjE=",
43 "avatar_url": "https://github.com/images/error/octocat_happy.gif",
44 "gravatar_id": "",
45 "url": "https://api.github.com/users/octocat",
46 "html_url": "https://github.com/octocat",
47 "followers_url": "https://api.github.com/users/octocat/followers",
48 "following_url": "https://api.github.com/users/octocat/following{/other_user}",
49 "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
50 "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
51 "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
52 "organizations_url": "https://api.github.com/users/octocat/orgs",
53 "repos_url": "https://api.github.com/users/octocat/repos",
54 "events_url": "https://api.github.com/users/octocat/events{/privacy}",
55 "received_events_url": "https://api.github.com/users/octocat/received_events",
56 "type": "User",
57 "site_admin": False,
58 },
59 "committer": {
60 "login": "octocat",
61 "id": 1,
62 "node_id": "MDQ6VXNlcjE=",
63 "avatar_url": "https://github.com/images/error/octocat_happy.gif",
64 "gravatar_id": "",
65 "url": "https://api.github.com/users/octocat",
66 "html_url": "https://github.com/octocat",
67 "followers_url": "https://api.github.com/users/octocat/followers",
68 "following_url": "https://api.github.com/users/octocat/following{/other_user}",
69 "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
70 "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
71 "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
72 "organizations_url": "https://api.github.com/users/octocat/orgs",
73 "repos_url": "https://api.github.com/users/octocat/repos",
74 "events_url": "https://api.github.com/users/octocat/events{/privacy}",
75 "received_events_url": "https://api.github.com/users/octocat/received_events",
76 "type": "User",
77 "site_admin": False,
78 },
79 "parents": [
80 {
81 "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
82 "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
83 }
84 ],
85 "stats": {"additions": 104, "deletions": 4, "total": 108},
86 "files": [
87 {
88 "filename": "file1.txt",
89 "additions": 10,
90 "deletions": 2,
91 "changes": 12,
92 "status": "modified",
93 "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
94 "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
95 "patch": "@@ -29,7 +29,7 @@\n.....",
96 }
97 ],
98 }