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

Commit191e09b

Browse files
committed
Add integration test for Repository#create_deployment
1 parent1667973 commit191e09b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"http_interactions": [{"request": {"body": "", "headers": {"Accept-Encoding": "gzip, deflate, compress", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/0.8.0", "Accept-Charset": "utf-8", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py"}, "response": {"body": {"base64_string": "H4sIAAAAAAAAA62YS4/iOBDHvwqKNHtZGpMHzUMazc5lH7c5zF72gpzEEKuTOLIdWCbq777/ygMC2oXu9kqtFgTXz3+Xq5wqN55MvU249OdL3596JS+Et/H20mZ1HM6qkzf1dnWeb/sfjNwX/CB1bYKIXY1Sx1Job9N4udrLEozxUFBomiCar8L51OMHbrne1jrHuMzaymwY2+vu8SxRBes+ssSPVuHiOV2td+tgIZ7Xgb9cxUL46TrkyW75Jf3cmn8Kv34KfsWfTEVpZaJKM+vUEQ3PI770l8/RPIySlIvVchmtolgsg6W/ivkieJ5V5f4n/flvCB10bEmx90gBDK6XwSs5mprVRmjDbnyR2SK/XX3r8XbtN4N3Ks/VEZQbi4cTsbMlbWJLkeX+gxRYNkzZTGDbsKRXcpQ09v2iWqsGsWMsPEwcg1jQIn23sN4Osij0XhumRaVaYB2bRMvKSsTB+7Fja9CU3vNS/uAfo8HaAELS3i+ltYK1OCCq32/emTWs0vLAkxO5RotEyAOc/UHkjT2I9lTRifEngoJcL63Y8rSgE2DHcyNep147vcWg9sEUCf/W6L8+YVJx3lVM+O1kM1VOchlrrk+TndITWVqhdzxBrE6OyKcJwnXym7S/1/Hk67c/DiEEYtzLWcndzG2df5WM13KI9GBP7iKQngBA0os4OXHIvmH43+dTglTnsdLcqkeHxn2BV6CGjb9SLFnBCyfhLQCgTCk3T7YAgKQxtXhTaN9feMsxbMifsi7i7sh7S9bcR3cEaOUG53wphJMHz5CmfdHQriAdyiRzww6MhnWf2t3meyepZE/ychU7cfBaZy2kYSbj3XvIbl3VEZUYV1Atds5SiXGGWu24361MgpyReAlabL2TzoHBmt6jOS/3Nd+7Uc8Q7Dq9qvf8x8Mi5n7uXChAosazWsa1+yF34ZDS7u2PfHdz6QVzgbYFyf165IEDRqVJ64KikI/qgvvEHnEV9v8DluL0Fk3fH5cxj+USo2GXM7k79Hu6i3f7U3/QyZrLHBRs7to7Bmt+rrjN6OTCVBXXwkV0j2BNzFFszWazJhO8LasLoR0zuCMAxXWSoWp00dkMDFQ9Bbdttb4jmSmq91zx1CndzhAAu2100doRxjFWoQV2EtgCxsRC5sJYVbqdsRfKmF0qK3cyeUvHcj/drkDNFyPLREx5nk8RteiyJeIYtTbtIgpO4eahjoBl4AaCiFrkAiHt5PWB0bCu00y0QCOSbrlFAxHM/eBpHj754Xd/vVmsNovwL8xbV+nVmOhpHjwF4fdgvvGDTRjRmKo22QhzMySgITgB+xDEJ7rd+Pf+ftRS0K0BDI3JLoa/XMw2/3H10pslOWLpJujfPufh9rX02BRSM1WICmVCf4lzXmVYnWbwdIr2K1WJmaEHZrQy+QNDF6vV8qogSFRdYj/8Z1w/HblF7YpX7/jhUEicmz6ampttl6bexuqauko8uRwDo4dH+SLPHV/XtPX0aI1TUmqt+quoEkmKfr8SZc8+ywi7xtF4G7IZjYBu/DbI7leRih2vc7vtimfITlH156qiyBG6gG66mKC7sr5T7lZAUTWshs6L7jMa6FLYI3rFQQ1JGJcpg6+i138A/TI3gs0TAAA=", "encoding": "utf-8"}, "headers": {"status": "200 OK", "x-ratelimit-remaining": "4997", "x-github-media-type": "github.v3; param=full; format=json", "x-content-type-options": "nosniff", "access-control-expose-headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "transfer-encoding": "chunked", "x-github-request-id": "48A0D539:60AD:2582B20:530AACF3", "content-encoding": "gzip", "vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding", "server": "GitHub.com", "cache-control": "private, max-age=60, s-maxage=60", "last-modified": "Sun, 23 Feb 2014 20:12:34 GMT", "x-ratelimit-limit": "5000", "etag": "\"428a90e7f7aac36394a2dbf5dc9e14ab\"", "access-control-allow-credentials": "true", "date": "Mon, 24 Feb 2014 02:22:44 GMT", "access-control-allow-origin": "*", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1393211460"}, "url": "https://api.github.com/repos/sigmavirus24/github3.py", "status_code": 200}, "recorded_at": "2014-02-24T02:21:07"}, {"request": {"body": "{\"force\": false, \"ref\": \"0.8.2\", \"payload\": \"\", \"auto_merge\": false, \"description\": \"\"}", "headers": {"Content-Length": "87", "Accept-Encoding": "gzip, deflate, compress", "Accept": "application/vnd.github.cannonball-preview+json", "User-Agent": "github3.py/0.8.0", "Accept-Charset": "utf-8", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "POST", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/deployments"}, "response": {"body": {"string": "{\"url\":\"https://api.github.com/repos/sigmavirus24/github3.py/deployments/801\",\"id\":801,\"sha\":\"aa0b457c3c7692a0da05b6771ce44c980febd4a1\",\"payload\":\"\\\"\\\"\",\"description\":\"\",\"creator\":{\"login\":\"sigmavirus24\",\"id\":240830,\"avatar_url\":\"https://gravatar.com/avatar/c148356d89f925e692178bee1d93acf7?d=https%3A%2F%2Fidenticons.github.com%2F4a71764034cdae877484be72718ba526.png&r=x\",\"gravatar_id\":\"c148356d89f925e692178bee1d93acf7\",\"url\":\"https://api.github.com/users/sigmavirus24\",\"html_url\":\"https://github.com/sigmavirus24\",\"followers_url\":\"https://api.github.com/users/sigmavirus24/followers\",\"following_url\":\"https://api.github.com/users/sigmavirus24/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/sigmavirus24/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/sigmavirus24/subscriptions\",\"organizations_url\":\"https://api.github.com/users/sigmavirus24/orgs\",\"repos_url\":\"https://api.github.com/users/sigmavirus24/repos\",\"events_url\":\"https://api.github.com/users/sigmavirus24/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/sigmavirus24/received_events\",\"type\":\"User\",\"site_admin\":false},\"created_at\":\"2014-02-24T02:22:44Z\",\"updated_at\":\"2014-02-24T02:22:44Z\",\"statuses_url\":\"https://api.github.com/repos/sigmavirus24/github3.py/deployments/801/statuses\"}", "encoding": "utf-8"}, "headers": {"status": "201 Created", "x-ratelimit-remaining": "4996", "x-github-media-type": "github.cannonball-preview; format=json", "x-content-type-options": "nosniff", "access-control-expose-headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "x-github-request-id": "48A0D539:60AD:2582B48:530AACF4", "cache-control": "private, max-age=60, s-maxage=60", "vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "content-length": "1389", "server": "GitHub.com", "last-modified": "Mon, 24 Feb 2014 02:22:44 GMT", "x-ratelimit-limit": "5000", "location": "https://api.github.com/repos/sigmavirus24/github3.py/deployments/801", "access-control-allow-credentials": "true", "date": "Mon, 24 Feb 2014 02:22:44 GMT", "etag": "\"17579795205f3c31a17f64dbfff32052\"", "content-type": "application/json; charset=utf-8", "access-control-allow-origin": "*", "x-ratelimit-reset": "1393211460"}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/deployments", "status_code": 201}, "recorded_at": "2014-02-24T02:21:07"}], "recorded_with": "betamax"}

‎tests/integration/test_repos_repo.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55

66
classTestRepository(IntegrationHelper):
7+
deftest_create_deployment(self):
8+
"""Test the ability to create a deployment for a repository."""
9+
self.basic_login()
10+
cassette_name=self.cassette_name('create_deployment')
11+
withself.recorder.use_cassette(cassette_name):
12+
repository=self.gh.repository('sigmavirus24','github3.py')
13+
assertrepositoryisnotNone
14+
deployment=repository.create_deployment('0.8.2')
15+
16+
assertisinstance(deployment,github3.repos.deployment.Deployment)
17+
718
deftest_create_release(self):
819
"""Test the ability to create a release on a repository."""
920
self.token_login()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp