Skip to content

Commit 5042881

Browse files
committed
Fix up last few things post merge
1 parent 4b210a7 commit 5042881

File tree

2 files changed

+90
-68
lines changed

2 files changed

+90
-68
lines changed

tests/unit/json/pull_request_example

Lines changed: 87 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"state": "open",
1515
"title": "new-feature",
1616
"body": "Please pull these awesome changes",
17+
"body_html": "Please pull these awesome changes",
18+
"body_text": "Please pull these awesome changes",
1719
"assignee": {
1820
"login": "octocat",
1921
"id": 1,
@@ -74,9 +76,9 @@
7476
"closed_at": "2011-01-26T19:01:12Z",
7577
"merged_at": "2011-01-26T19:01:12Z",
7678
"head": {
77-
"label": "unoju:patch-1",
78-
"ref": "patch-1",
79-
"sha": "7044a8a032e85b6ab611033b2ac8af7ce85805b2",
79+
"label": "new-topic",
80+
"ref": "new-topic",
81+
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
8082
"user": {
8183
"login": "octocat",
8284
"id": 1,
@@ -97,9 +99,7 @@
9799
"site_admin": false
98100
},
99101
"repo": {
100-
"id": 1724195,
101-
"name": "Hello-World",
102-
"full_name": "unoju/Hello-World",
102+
"id": 1296269,
103103
"owner": {
104104
"login": "octocat",
105105
"id": 1,
@@ -119,6 +119,9 @@
119119
"type": "User",
120120
"site_admin": false
121121
},
122+
"name": "Hello-World",
123+
"full_name": "octocat/Hello-World",
124+
"description": "This your first repo!",
122125
"private": false,
123126
"fork": true,
124127
"url": "https://api.github.com/repos/octocat/Hello-World",
@@ -199,9 +202,9 @@
199202
}
200203
},
201204
"base": {
202-
"label": "octocat:master",
205+
"label": "master",
203206
"ref": "master",
204-
"sha": "553c2077f0edc3d5dc5d17262f6aa498e69d6f8e",
207+
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
205208
"user": {
206209
"login": "octocat",
207210
"id": 1,
@@ -223,8 +226,6 @@
223226
},
224227
"repo": {
225228
"id": 1296269,
226-
"name": "Hello-World",
227-
"full_name": "octocat/Hello-World",
228229
"owner": {
229230
"login": "octocat",
230231
"id": 1,
@@ -244,67 +245,86 @@
244245
"type": "User",
245246
"site_admin": false
246247
},
248+
"name": "Hello-World",
249+
"full_name": "octocat/Hello-World",
250+
"description": "This your first repo!",
247251
"private": false,
248-
"collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
249-
"teams_url": "https://api.github.com/repos/octocat/Hello-World/teams",
250-
"hooks_url": "https://api.github.com/repos/octocat/Hello-World/hooks",
251-
"issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
252-
"events_url": "https://api.github.com/repos/octocat/Hello-World/events",
253-
"assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}",
254-
"branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}",
255-
"tags_url": "https://api.github.com/repos/octocat/Hello-World/tags",
256-
"blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
257-
"git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
258-
"git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
259-
"trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
260-
"statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
261-
"languages_url": "https://api.github.com/repos/octocat/Hello-World/languages",
262-
"stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers",
263-
"contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors",
264-
"subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers",
265-
"subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription",
266-
"commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}",
267-
"git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
268-
"comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}",
269-
"issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
270-
"contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}",
271-
"compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
272-
"merges_url": "https://api.github.com/repos/octocat/Hello-World/merges",
273-
"archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
274-
"downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads",
275-
"issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}",
276-
"pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}",
277-
"milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}",
278-
"notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
279-
"labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}",
280-
"releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}",
281-
"deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments",
282-
"created_at": "2011-01-26T19:01:12Z",
283-
"updated_at": "2017-12-11T14:04:32Z",
284-
"pushed_at": "2017-12-17T22:54:51Z",
285-
"git_url": "git://github.com/octocat/Hello-World.git",
286-
"ssh_url": "git@github.com:octocat/Hello-World.git",
252+
"fork": true,
253+
"url": "https://api.github.com/repos/octocat/Hello-World",
254+
"html_url": "https://github.com/octocat/Hello-World",
255+
"archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
256+
"assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
257+
"blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
258+
"branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
287259
"clone_url": "https://github.com/octocat/Hello-World.git",
288-
"svn_url": "https://github.com/octocat/Hello-World",
289-
"homepage": "",
290-
"size": 578,
291-
"stargazers_count": 1435,
292-
"watchers_count": 1435,
260+
"collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
261+
"comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
262+
"commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
263+
"compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
264+
"contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
265+
"contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
266+
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
267+
"downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
268+
"events_url": "http://api.github.com/repos/octocat/Hello-World/events",
269+
"forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
270+
"git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
271+
"git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
272+
"git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
273+
"git_url": "git:github.com/octocat/Hello-World.git",
274+
"hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
275+
"issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
276+
"issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
277+
"issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
278+
"keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
279+
"labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
280+
"languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
281+
"merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
282+
"milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
283+
"mirror_url": "git:git.example.com/octocat/Hello-World",
284+
"notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}",
285+
"pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
286+
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
287+
"ssh_url": "git@github.com:octocat/Hello-World.git",
288+
"stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
289+
"statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
290+
"subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
291+
"subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
292+
"svn_url": "https://svn.github.com/octocat/Hello-World",
293+
"tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
294+
"teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
295+
"trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
296+
"homepage": "https://github.com",
293297
"language": null,
298+
"forks_count": 9,
299+
"stargazers_count": 80,
300+
"watchers_count": 80,
301+
"size": 108,
302+
"default_branch": "master",
303+
"open_issues_count": 0,
304+
"topics": [
305+
"octocat",
306+
"atom",
307+
"electron",
308+
"API"
309+
],
294310
"has_issues": true,
295-
"has_projects": true,
296-
"has_downloads": true,
297311
"has_wiki": true,
298312
"has_pages": false,
299-
"forks_count": 1214,
300-
"mirror_url": null,
313+
"has_downloads": true,
301314
"archived": false,
302-
"open_issues_count": 277,
303-
"license": null,
304-
"forks": 1214,
305-
"open_issues": 277,
306-
"watchers": 1435,
307-
"default_branch": "master"
315+
"pushed_at": "2011-01-26T19:06:43Z",
316+
"created_at": "2011-01-26T19:01:12Z",
317+
"updated_at": "2011-01-26T19:14:43Z",
318+
"permissions": {
319+
"admin": false,
320+
"push": false,
321+
"pull": true
322+
},
323+
"allow_rebase_merge": true,
324+
"allow_squash_merge": true,
325+
"allow_merge_commit": true,
326+
"subscribers_count": 42,
327+
"network_count": 0
308328
}
309329
},
310330
"_links": {
@@ -330,7 +350,7 @@
330350
"href": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits"
331351
},
332352
"statuses": {
333-
"href": "https://api.github.com/repos/octocat/Hello-World/statuses/7044a8a032e85b6ab611033b2ac8af7ce85805b2"
353+
"href": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e"
334354
}
335355
},
336356
"user": {
@@ -355,6 +375,8 @@
355375
"merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6",
356376
"merged": false,
357377
"mergeable": true,
378+
"mergeable_state": "unknown",
379+
"review_comments": 0,
358380
"merged_by": {
359381
"login": "octocat",
360382
"id": 1,

tests/unit/test_pulls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ def test_update(self):
150150

151151
def test_attributes(self):
152152
"""Show that we extract attributes correctly."""
153-
assert self.instance.merge_commit_sha == \
154-
'f13731c44acf96f2e5d6f0080f54e09215e36248'
153+
assert (self.instance.merge_commit_sha ==
154+
'e5bd3914e2e596debea16f433f57875b5b90bcd6')
155155
assert not self.instance.merged
156-
assert not self.instance.mergeable
156+
assert self.instance.mergeable
157157

158158

159159
class TestPullRequestRequiresAuthentication(

0 commit comments

Comments
 (0)