Debian Codegraph @

tests/legacy/responses/releases.py

raw
1 """Fixtures."""
2 # pylint: disable=missing-docstring
3 import pytest
4
5
6 @pytest.fixture()
7 def releases_response():
8 return [
9 {
10 "url": "https://api.github.com/repos/octocat/Hello-World/releases/1",
11 "html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0",
12 "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets",
13 "upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}",
14 "tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0",
15 "zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0",
16 "id": 1,
17 "node_id": "MDc6UmVsZWFzZTE=",
18 "tag_name": "v1.0.0",
19 "target_commitish": "main",
20 "name": "v1.0.0",
21 "body": "Description of the release",
22 "draft": False,
23 "prerelease": False,
24 "created_at": "2013-02-27T19:35:32Z",
25 "published_at": "2013-02-27T19:35:32Z",
26 "author": {
27 "login": "octocat",
28 "id": 1,
29 "node_id": "MDQ6VXNlcjE=",
30 "avatar_url": "https://github.com/images/error/octocat_happy.gif",
31 "gravatar_id": "",
32 "url": "https://api.github.com/users/octocat",
33 "html_url": "https://github.com/octocat",
34 "followers_url": "https://api.github.com/users/octocat/followers",
35 "following_url": "https://api.github.com/users/octocat/following{/other_user}",
36 "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
37 "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
38 "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
39 "organizations_url": "https://api.github.com/users/octocat/orgs",
40 "repos_url": "https://api.github.com/users/octocat/repos",
41 "events_url": "https://api.github.com/users/octocat/events{/privacy}",
42 "received_events_url": "https://api.github.com/users/octocat/received_events",
43 "type": "User",
44 "site_admin": False,
45 },
46 "assets": [
47 {
48 "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1",
49 "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip",
50 "id": 1,
51 "node_id": "MDEyOlJlbGVhc2VBc3NldDE=",
52 "name": "example.zip",
53 "label": "short description",
54 "state": "uploaded",
55 "content_type": "application/zip",
56 "size": 1024,
57 "download_count": 42,
58 "created_at": "2013-02-27T19:35:32Z",
59 "updated_at": "2013-02-27T19:35:32Z",
60 "uploader": {
61 "login": "octocat",
62 "id": 1,
63 "node_id": "MDQ6VXNlcjE=",
64 "avatar_url": "https://github.com/images/error/octocat_happy.gif",
65 "gravatar_id": "",
66 "url": "https://api.github.com/users/octocat",
67 "html_url": "https://github.com/octocat",
68 "followers_url": "https://api.github.com/users/octocat/followers",
69 "following_url": "https://api.github.com/users/octocat/following{/other_user}",
70 "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
71 "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
72 "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
73 "organizations_url": "https://api.github.com/users/octocat/orgs",
74 "repos_url": "https://api.github.com/users/octocat/repos",
75 "events_url": "https://api.github.com/users/octocat/events{/privacy}",
76 "received_events_url": "https://api.github.com/users/octocat/received_events",
77 "type": "User",
78 "site_admin": False,
79 },
80 }
81 ],
82 },
83 {
84 "url": "https://api.github.com/repos/octocat/Hello-World/releases/1",
85 "html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0",
86 "assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets",
87 "upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}",
88 "tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0",
89 "zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0",
90 "id": 1,
91 "node_id": "MDc6UmVsZWFzZTE=",
92 "tag_name": "v1.0.0",
93 "target_commitish": "main",
94 "name": "v1.0.0",
95 "body": "Description of the release",
96 "draft": False,
97 "prerelease": True,
98 "created_at": "2013-02-27T19:35:32Z",
99 "published_at": "2013-02-27T19:35:32Z",
100 "author": {
101 "login": "octocat",
102 "id": 1,
103 "node_id": "MDQ6VXNlcjE=",
104 "avatar_url": "https://github.com/images/error/octocat_happy.gif",
105 "gravatar_id": "",
106 "url": "https://api.github.com/users/octocat",
107 "html_url": "https://github.com/octocat",
108 "followers_url": "https://api.github.com/users/octocat/followers",
109 "following_url": "https://api.github.com/users/octocat/following{/other_user}",
110 "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
111 "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
112 "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
113 "organizations_url": "https://api.github.com/users/octocat/orgs",
114 "repos_url": "https://api.github.com/users/octocat/repos",
115 "events_url": "https://api.github.com/users/octocat/events{/privacy}",
116 "received_events_url": "https://api.github.com/users/octocat/received_events",
117 "type": "User",
118 "site_admin": False,
119 },
120 "assets": [
121 {
122 "url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1",
123 "browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip",
124 "id": 1,
125 "node_id": "MDEyOlJlbGVhc2VBc3NldDE=",
126 "name": "example.zip",
127 "label": "short description",
128 "state": "uploaded",
129 "content_type": "application/zip",
130 "size": 1024,
131 "download_count": 42,
132 "created_at": "2013-02-27T19:35:32Z",
133 "updated_at": "2013-02-27T19:35:32Z",
134 "uploader": {
135 "login": "octocat",
136 "id": 1,
137 "node_id": "MDQ6VXNlcjE=",
138 "avatar_url": "https://github.com/images/error/octocat_happy.gif",
139 "gravatar_id": "",
140 "url": "https://api.github.com/users/octocat",
141 "html_url": "https://github.com/octocat",
142 "followers_url": "https://api.github.com/users/octocat/followers",
143 "following_url": "https://api.github.com/users/octocat/following{/other_user}",
144 "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
145 "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
146 "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
147 "organizations_url": "https://api.github.com/users/octocat/orgs",
148 "repos_url": "https://api.github.com/users/octocat/repos",
149 "events_url": "https://api.github.com/users/octocat/events{/privacy}",
150 "received_events_url": "https://api.github.com/users/octocat/received_events",
151 "type": "User",
152 "site_admin": False,
153 },
154 }
155 ],
156 },
157 ]