8000 Merge pull request #482 from itsmemattchung/migrate-tests/events · pythonthings/github3.py@247f30e · GitHub
[go: up one dir, main page]

Skip to content

Commit 247f30e

Browse files
committed
Merge pull request sigmavirus24#482 from itsmemattchung/migrate-tests/events
Migrated tests/test_events to tests/unit/test_events
2 parents e42049b + 95ec648 commit 247f30e

File tree

8 files changed

+528
-91
lines changed

8 files changed

+528
-91
lines changed

tests/test_events.py

Lines changed: 0 additions & 91 deletions
This file was deleted.

tests/unit/comment_example

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1",
3+
"url": "https://api.github.com/repos/octocat/Hello-World/comments/1",
4+
"id": 1,
5+
"body": "Great stuff",
6+
"path": "file1.txt",
7+
"position": 4,
8+
"line": 14,
9+
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
10+
"user": {
11+
"login": "octocat",
12+
"id": 1,
13+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
14+
"gravatar_id": "",
15+
"url": "https://api.github.com/users/octocat",
16+
"html_url": "https://github.com/octocat",
17+
"followers_url": "https://api.github.com/users/octocat/followers",
18+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
19+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
20+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
21+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
22+
"organizations_url": "https://api.github.com/users/octocat/orgs",
23+
"repos_url": "https://api.github.com/users/octocat/repos",
24+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
25+
"received_events_url": "https://api.github.com/users/octocat/received_events",
26+
"type": "User",
27+
"site_admin": false
28+
},
29+
"created_at": "2011-04-14T16:00:49Z",
30+
"updated_at": "2011-04-14T16:00:49Z"
31+
}

tests/unit/event_example

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"type": "Event",
3+
"public": true,
4+
"payload": {},
5+
"repo": {
6+
"id": 3,
7+
"name": "octocat/Hello-World",
8+
"url": "https://api.github.com/repos/octocat/Hello-World"
9+
},
10+
"actor": {
11+
"id": 1,
12+
"login": "octocat",
13+
"gravatar_id": "",
14+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
15+
"url": "https://api.github.com/users/octocat"
16+
},
17+
"org": {
18+
"id": 1,
19+
"login": "github",
20+
"gravatar_id": "",
21+
"url": "https://api.github.com/orgs/github",
22+
"avatar_url": "https://github.com/images/error/octocat_happy.gif"
23+
},
24+
"created_at": "2011-09-06T17:26:27Z",
25+
"id": "12345"
26+
}

tests/unit/org_example

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"login": "github",
3+
"id": 1,
4+
"url": "https://api.github.com/orgs/github",
5+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
6+
"description": "A great organization",
7+
"name": "github",
8+
"company": "GitHub",
9+
"blog": "https://github.com/blog",
10+
"location": "San Francisco",
11+
"email": "octocat@github.com",
12+
"public_repos": 2,
13+
"public_gists": 1,
14+
"followers": 20,
15+
"following": 0,
16+
"html_url": "https://github.com/octocat",
17+
"created_at": "2008-01-14T04:33:35Z",
18+
"type": "Organization"
19+
}

0 commit comments

Comments
 (0)
0