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

Commit764395e

Browse files
committed
Integration test for GitHub#octocat
1 parentbb89bf7 commit764395e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

‎tests/cassettes/GitHub_octocat.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"http_interactions": [{"request": {"body": "", "headers": {"Accept-Charset": "utf-8", "Content-Type": "application/json", "Accept-Encoding": "gzip, deflate, compress", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/0.8.0"}, "method": "GET", "uri": "https://api.github.com/octocat"}, "response": {"body": {"string": "\n MMM. .MMM\n MMMMMMMMMMMMMMMMMMM\n MMMMMMMMMMMMMMMMMMM ______________________________________\n MMMMMMMMMMMMMMMMMMMMM | |\n MMMMMMMMMMMMMMMMMMMMMMM | Mind your words, they are important. |\n MMMMMMMMMMMMMMMMMMMMMMMM |_ __________________________________|\n MMMM::- -:::::::- -::MMMM |/\n MM~:~ ~:::::~ ~:~MM\n .. MMMMM::. .:::+:::. .::MMMMM ..\n .MM::::: ._. :::::MM.\n MMMM;:::::;MMMM\n -MM MMMMMMM\n ^ M+ MMMMMMMMM\n MMMMMMM MM MM MM\n MM MM MM MM\n MM MM MM MM\n .~~MM~MM~MM~MM~~.\n ~~~~MM:~MM~~~MM~:MM~~~~\n ~~~~~~==~==~~~==~==~~~~~~\n ~~~~~~==~==~==~==~~~~~~\n :~==~==~==~==~~\n", "encoding": null}, "headers": {"status": "200 OK", "x-ratelimit-remaining": "59", "x-content-type-options": "nosniff", "access-control-expose-headers": "ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes", "x-github-request-id": "48A0B5B6:678E:5336CDB:527C6618", "vary": "Accept-Encoding", "content-length": "913", "server": "GitHub.com", "x-ratelimit-limit": "60", "access-control-allow-credentials": "true", "date": "Fri, 08 Nov 2013 04:18:32 GMT", "access-control-allow-origin": "*", "content-type": "application/octocat-stream", "x-ratelimit-reset": "1383887912"}, "url": "https://api.github.com/octocat", "status_code": 200}, "recorded_at": "2013-11-08T04:18:29"}, {"request": {"body": "", "headers": {"Accept-Charset": "utf-8", "Content-Type": "application/json", "Accept-Encoding": "gzip, deflate, compress", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/0.8.0"}, "method": "GET", "uri": "https://api.github.com/octocat?s=github3.py+is+awesome"}, "response": {"body": {"string": "\n MMM. .MMM\n MMMMMMMMMMMMMMMMMMM\n MMMMMMMMMMMMMMMMMMM _______________________\n MMMMMMMMMMMMMMMMMMMMM | |\n MMMMMMMMMMMMMMMMMMMMMMM | github3.py is awesome |\n MMMMMMMMMMMMMMMMMMMMMMMM |_ ___________________|\n MMMM::- -:::::::- -::MMMM |/\n MM~:~ ~:::::~ ~:~MM\n .. MMMMM::. .:::+:::. .::MMMMM ..\n .MM::::: ._. :::::MM.\n MMMM;:::::;MMMM\n -MM MMMMMMM\n ^ M+ MMMMMMMMM\n MMMMMMM MM MM MM\n MM MM MM MM\n MM MM MM MM\n .~~MM~MM~MM~MM~~.\n ~~~~MM:~MM~~~MM~:MM~~~~\n ~~~~~~==~==~~~==~==~~~~~~\n ~~~~~~==~==~==~==~~~~~~\n :~==~==~==~==~~\n", "encoding": null}, "headers": {"status": "200 OK", "x-ratelimit-remaining": "58", "x-content-type-options": "nosniff", "access-control-expose-headers": "ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes", "x-github-request-id": "48A0B5B6:678E:5336CED:527C6618", "vary": "Accept-Encoding", "content-length": "853", "server": "GitHub.com", "x-ratelimit-limit": "60", "access-control-allow-credentials": "true", "date": "Fri, 08 Nov 2013 04:18:32 GMT", "access-control-allow-origin": "*", "content-type": "application/octocat-stream", "x-ratelimit-reset": "1383887912"}, "url": "https://api.github.com/octocat?s=github3.py+is+awesome", "status_code": 200}, "recorded_at": "2013-11-08T04:18:30"}], "recorded_with": "betamax"}

‎tests/integration/test_github.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ def test_create_key(self):
5656
assertk.title=='Key name'
5757
assertk.key==SSH_KEY
5858

59+
deftest_octocat(self):
60+
"""Test the ability to use the octocat endpoint"""
61+
cassette_name=self.cassette_name('octocat')
62+
say='github3.py is awesome'
63+
withself.recorder.use_cassette(cassette_name):
64+
o=self.gh.octocat()
65+
assertoisnotNone
66+
assertoisnot''
67+
o=self.gh.octocat(say)
68+
assertsayino
69+
5970
deftest_organization(self):
6071
"""Test the ability to retrieve an Organization"""
6172
cassette_name=self.cassette_name('organization')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp