Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbd2e9f4

Browse files
committed
Moved unit test data files into json directory
Normalized json file names to remove '_data'Removed inline JSON from tests/unit/*.py
1 parent3ee5c15 commitbd2e9f4

File tree

43 files changed

+410
-554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+410
-554
lines changed

‎AUTHORS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,5 @@ Contributors
114114
- Bastien Gandouet (@b4stien)
115115

116116
- Usman Ehtesham Gul (@ueg1990)
117+
118+
- Derek Gustafson (@degustaf)

‎tests/unit/helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def url_for(path=''):
2424
defcreate_example_data_helper(example_filename):
2525
"""A function to generate example data helpers."""
2626
directory=os.path.dirname(__file__)
27+
directory=os.path.join(directory,"json")
2728
example=os.path.join(directory,example_filename)
2829

2930
defdata_helper():

‎tests/unit/json/authorization_example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"id": 1,
3+
"url": "https://api.github.com/authorizations/1",
4+
"scopes": [
5+
"public_repo"
6+
],
7+
"token": "abc123",
8+
"app": {
9+
"url": "http://my-github-app.com",
10+
"name": "my github app",
11+
"client_id": "abcde12345fghij67890"
12+
},
13+
"note": "optional note",
14+
"note_url": "http://optional/note/url",
15+
"updated_at": "2011-09-06T20:39:23Z",
16+
"created_at": "2011-09-06T17:26:27Z"
17+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎tests/unit/json/milestone_example

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"url": "https://api.github.com/repos/octocat/Hello-World/milestones/1",
3+
"number": 1,
4+
"state": "open",
5+
"title": "v1.0",
6+
"description": "",
7+
"creator": {
8+
"login": "octocat",
9+
"id": 1,
10+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
11+
"gravatar_id": "somehexcode",
12+
"url": "https://api.github.com/users/octocat",
13+
"html_url": "https://github.com/octocat",
14+
"followers_url": "https://api.github.com/users/octocat/followers",
15+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
16+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
17+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
18+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
19+
"organizations_url": "https://api.github.com/users/octocat/orgs",
20+
"repos_url": "https://api.github.com/users/octocat/repos",
21+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
22+
"received_events_url": "https://api.github.com/users/octocat/received_events",
23+
"type": "User",
24+
"site_admin": false
25+
},
26+
"open_issues": 4,
27+
"closed_issues": 8,
28+
"created_at": "2011-04-10T20:09:31Z",
29+
"updated_at": "2014-03-03T18:58:10Z",
30+
"due_on": null
31+
}
File renamed without changes.

‎tests/unit/json/org_example

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
"name": "github",
7+
"company": "GitHub",
8+
"blog": "https://github.com/blog",
9+
"location": "San Francisco",
10+
"email": "octocat@github.com",
11+
"public_repos": 2,
12+
"public_gists": 1,
13+
"followers": 20,
14+
"following": 0,
15+
"html_url": "https://github.com/github",
16+
"created_at": "2008-01-14T04:33:35Z",
17+
"type": "Organization"
18+
}

‎tests/unit/json/orgs_team_example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"url": "https://api.github.com/teams/10",
3+
"name": "Owners",
4+
"id": 10,
5+
"permission": "admin",
6+
"members_count": 3,
7+
"repos_count": 10,
8+
"organization": {
9+
"login": "github",
10+
"id": 1,
11+
"url": "https://api.github.com/orgs/github",
12+
"avatar_url": "https://github.com/images/error/octocat_happy.gif"
13+
}
14+
}

‎tests/unit/json/pull_file_example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"sha": "bbcd538c8e72b8c175046e27cc8f907076331401",
3+
"filename": "file1.txt",
4+
"status": "added",
5+
"additions": 103,
6+
"deletions": 21,
7+
"changes": 124,
8+
"blob_url": "https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt",
9+
"raw_url": "https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt",
10+
"contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e",
11+
"patch": "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test"
12+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎tests/unit/json/repos_asset_example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1",
3+
"id": 1,
4+
"name": "example.zip",
5+
"label": "short description",
6+
"state": "uploaded",
7+
"content_type": "application/zip",
8+
"size": 1024,
9+
"download_count": 42,
10+
"created_at": "2013-02-27T19:35:32Z",
11+
"updated_at": "2013-02-27T19:35:32Z"
12+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"url": "https://api.github.com/repos/octocat/example/deployments/1",
3+
"id": 1,
4+
"sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
5+
"ref": "master",
6+
"task": "deploy",
7+
"payload": {
8+
"task": "deploy:migrate"
9+
},
10+
"environment": "production",
11+
"description": "Deploy request from hubot",
12+
"creator": {
13+
"login": "octocat",
14+
"id": 1,
15+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
16+
"gravatar_id": "somehexcode",
17+
"url": "https://api.github.com/users/octocat",
18+
"html_url": "https://github.com/octocat",
19+
"followers_url": "https://api.github.com/users/octocat/followers",
20+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
21+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
22+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
23+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
24+
"organizations_url": "https://api.github.com/users/octocat/orgs",
25+
"repos_url": "https://api.github.com/users/octocat/repos",
26+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
27+
"received_events_url": "https://api.github.com/users/octocat/received_events",
28+
"type": "User",
29+
"site_admin": false
30+
},
31+
"created_at": "2012-07-20T01:19:13Z",
32+
"updated_at": "2012-07-20T01:19:13Z",
33+
"statuses_url": "https://api.github.com/repos/octocat/example/deployments/1/statuses",
34+
"repository_url": "https://api.github.com/repos/octocat/example"
35+
}

‎tests/unit/json/repos_release_example

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"url": "https://api.github.com/repos/octocat/Hello-World/releases/1",
3+
"html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0",
4+
"assets": [{
5+
"url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1",
6+
"id": 1,
7+
"name": "example.zip",
8+
"label": "short description",
9+
"state": "uploaded",
10+
"content_type": "application/zip",
11+
"size": 1024,
12+
"download_count": 42,
13+
"created_at": "2013-02-27T19:35:32Z",
14+
"updated_at": "2013-02-27T19:35:32Z"
15+
}],
16+
"assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets",
17+
"upload_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets{?name}{&label}",
18+
"id": 1,
19+
"tag_name": "v1.0.0",
20+
"target_commitish": "master",
21+
"name": "v1.0.0",
22+
"body": "Description of the release",
23+
"draft": false,
24+
"prerelease": false,
25+
"created_at": "2013-02-27T19:35:32Z",
26+
"published_at": "2013-02-27T19:35:32Z"
27+
}

‎tests/unit/json/repos_repo_example

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"id": 1296269,
3+
"owner": {
4+
"login": "octocat",
5+
"id": 1,
6+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
7+
"gravatar_id": "somehexcode",
8+
"url": "https://api.github.com/users/octocat"
9+
},
10+
"name": "Hello-World",
11+
"full_name": "octocat/Hello-World",
12+
"description": "This your first repo!",
13+
"private": false,
14+
"fork": false,
15+
"url": "https://api.github.com/repos/octocat/Hello-World",
16+
"html_url": "https://github.com/octocat/Hello-World",
17+
"clone_url": "https://github.com/octocat/Hello-World.git",
18+
"git_url": "git://github.com/octocat/Hello-World.git",
19+
"ssh_url": "git@github.com:octocat/Hello-World.git",
20+
"svn_url": "https://svn.github.com/octocat/Hello-World",
21+
"mirror_url": "git://git.example.com/octocat/Hello-World",
22+
"homepage": "https://github.com",
23+
"language": null,
24+
"forks": 9,
25+
"forks_count": 9,
26+
"watchers": 80,
27+
"watchers_count": 80,
28+
"size": 108,
29+
"master_branch": "master",
30+
"open_issues": 0,
31+
"open_issues_count": 0,
32+
"pushed_at": "2011-01-26T19:06:43Z",
33+
"created_at": "2011-01-26T19:01:12Z",
34+
"updated_at": "2011-01-26T19:14:43Z",
35+
"organization": {
36+
"login": "octocat",
37+
"id": 1,
38+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
39+
"gravatar_id": "somehexcode",
40+
"url": "https://api.github.com/users/octocat",
41+
"type": "Organization"
42+
},
43+
"parent": {
44+
"id": 1296269,
45+
"owner": {
46+
"login": "octocat",
47+
"id": 1,
48+
"avatar_url": "https://github.com/images/error/octocat.gif",
49+
"gravatar_id": "somehexcode",
50+
"url": "https://api.github.com/users/octocat"
51+
},
52+
"name": "Hello-World",
53+
"full_name": "octocat/Hello-World",
54+
"description": "This your first repo!",
55+
"private": false,
56+
"fork": true,
57+
"url": "https://api.github.com/repos/octocat/Hello-World",
58+
"html_url": "https://github.com/octocat/Hello-World",
59+
"clone_url": "https://github.com/octocat/Hello-World.git",
60+
"git_url": "git://github.com/octocat/Hello-World.git",
61+
"ssh_url": "git@github.com:octocat/Hello-World.git",
62+
"svn_url": "https://svn.github.com/octocat/Hello-World",
63+
"mirror_url": "git://git.example.com/octocat/Hello-World",
64+
"homepage": "https://github.com",
65+
"language": null,
66+
"forks": 9,
67+
"forks_count": 9,
68+
"watchers": 80,
69+
"watchers_count": 80,
70+
"size": 108,
71+
"master_branch": "master",
72+
"open_issues": 0,
73+
"open_issues_count": 0,
74+
"pushed_at": "2011-01-26T19:06:43Z",
75+
"created_at": "2011-01-26T19:01:12Z",
76+
"updated_at": "2011-01-26T19:14:43Z"
77+
},
78+
"source": {
79+
"id": 1296269,
80+
"owner": {
81+
"login": "octocat",
82+
"id": 1,
83+
"avatar_url": "https://github.com/images/error/octocat.gif",
84+
"gravatar_id": "somehexcode",
85+
"url": "https://api.github.com/users/octocat"
86+
},
87+
"name": "Hello-World",
88+
"full_name": "octocat/Hello-World",
89+
"description": "This your first repo!",
90+
"private": false,
91+
"fork": true,
92+
"url": "https://api.github.com/repos/octocat/Hello-World",
93+
"html_url": "https://github.com/octocat/Hello-World",
94+
"clone_url": "https://github.com/octocat/Hello-World.git",
95+
"git_url": "git://github.com/octocat/Hello-World.git",
96+
"ssh_url": "git@github.com:octocat/Hello-World.git",
97+
"svn_url": "https://svn.github.com/octocat/Hello-World",
98+
"mirror_url": "git://git.example.com/octocat/Hello-World",
99+
"homepage": "https://github.com",
100+
"language": null,
101+
"forks": 9,
102+
"forks_count": 9,
103+
"watchers": 80,
104+
"watchers_count": 80,
105+
"size": 108,
106+
"master_branch": "master",
107+
"open_issues": 0,
108+
"open_issues_count": 0,
109+
"pushed_at": "2011-01-26T19:06:43Z",
110+
"created_at": "2011-01-26T19:01:12Z",
111+
"updated_at": "2011-01-26T19:14:43Z"
112+
},
113+
"has_issues": true,
114+
"has_wiki": true,
115+
"has_downloads": true
116+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
3+
"id": 1,
4+
"diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
5+
"path": "file1.txt",
6+
"position": 1,
7+
"original_position": 4,
8+
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
9+
"original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
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+
"body": "Great stuff",
30+
"created_at": "2011-04-14T16:00:49Z",
31+
"updated_at": "2011-04-14T16:00:49Z",
32+
"html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
33+
"pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
34+
"_links": {
35+
"self": {
36+
"href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
37+
},
38+
"html": {
39+
"href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
40+
},
41+
"pull_request": {
42+
"href": "https://api.github.com/repos/octocat/Hello-World/pulls/1"
43+
}
44+
}
45+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎tests/unit/json/users_example

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"login": "octocat",
3+
"id": 1,
4+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
5+
"gravatar_id": "somehexcode",
6+
"url": "https://api.github.com/users/octocat",
7+
"html_url": "https://github.com/octocat",
8+
"followers_url": "https://api.github.com/users/octocat/followers",
9+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
10+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
11+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
12+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
13+
"organizations_url": "https://api.github.com/users/octocat/orgs",
14+
"repos_url": "https://api.github.com/users/octocat/repos",
15+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
16+
"received_events_url": "https://api.github.com/users/octocat/received_events",
17+
"type": "User",
18+
"site_admin": false,
19+
"name": "monalisa octocat",
20+
"company": "GitHub",
21+
"blog": "https://github.com/blog",
22+
"location": "San Francisco",
23+
"email": "octocat@github.com",
24+
"hireable": false,
25+
"bio": "There once was...",
26+
"public_repos": 2,
27+
"public_gists": 1,
28+
"followers": 20,
29+
"following": 0,
30+
"created_at": "2008-01-14T04:33:35Z",
31+
"updated_at": "2008-01-14T04:33:35Z"
32+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp