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

Commit23ee53a

Browse files
committed
Test GitHub#zen
1 parent62051b7 commit23ee53a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎tests/cassettes/GitHub_zen.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/zen"}, "response": {"body": {"base64_string": "H4sIAAAAAAAAA/PLz9NNyslPzs7MS1fILFZISi0pSS1SKMlIzFOAiesBAJ7+lY0lAAAA", "encoding": "utf-8"}, "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", "transfer-encoding": "chunked", "x-github-request-id": "4270737C:7849:3D99EDE:52805D9E", "content-encoding": "gzip", "vary": "Accept-Encoding", "server": "GitHub.com", "x-ratelimit-limit": "60", "access-control-allow-credentials": "true", "date": "Mon, 11 Nov 2013 04:31:26 GMT", "access-control-allow-origin": "*", "content-type": "text/plain;charset=utf-8", "x-ratelimit-reset": "1384147886"}, "url": "https://api.github.com/zen", "status_code": 200}, "recorded_at": "2013-11-11T04:31:21"}], "recorded_with": "betamax"}

‎tests/integration/test_github.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,12 @@ def test_user(self):
107107

108108
assertisinstance(s,github3.users.User)
109109
assertisinstance(u,github3.users.User)
110+
111+
deftest_zen(self):
112+
"""Test the ability to retrieve tidbits of Zen"""
113+
cassette_name=self.cassette_name('zen')
114+
withself.recorder.use_cassette(cassette_name):
115+
z=self.gh.zen()
116+
117+
assertzisnotNone
118+
assertz!=''

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp