mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Test AuthenticatedUser.create_repo (requires manual edition of generated code)
This commit is contained in:
@@ -250,7 +250,7 @@ class AuthenticatedUser( object ):
|
||||
post_parameters[ "team_id" ] = team_id
|
||||
status, headers, data = self.__requester.request(
|
||||
"POST",
|
||||
str( self.url ) + "/repos",
|
||||
"https://api.github.com/user" + "/repos",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
POST /user/repos {} {"name": "TestPyGithub"}
|
||||
201
|
||||
[('status', '201 Created'), ('x-ratelimit-remaining', '4996'), ('content-length', '1035'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"0dee1203022ede8b8374b387ba479ffd"'), ('date', 'Thu, 10 May 2012 19:17:12 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/TestPyGithub')]
|
||||
{"mirror_url":null,"homepage":null,"clone_url":"https://github.com/jacquev6/TestPyGithub.git","html_url":"https://github.com/jacquev6/TestPyGithub","url":"https://api.github.com/repos/jacquev6/TestPyGithub","has_downloads":true,"watchers":1,"git_url":"git://github.com/jacquev6/TestPyGithub.git","permissions":{"admin":true,"pull":true,"push":true},"has_wiki":true,"has_issues":true,"fork":false,"forks":1,"language":null,"size":0,"description":null,"private":false,"created_at":"2012-05-10T19:17:12Z","open_issues":0,"svn_url":"https://github.com/jacquev6/TestPyGithub","owner":{"url":"https://api.github.com/users/jacquev6","login":"jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146},"name":"TestPyGithub","pushed_at":"2012-05-10T19:17:12Z","id":4288693,"ssh_url":"git@github.com:jacquev6/TestPyGithub.git","updated_at":"2012-05-10T19:17:12Z"}
|
||||
|
||||
@@ -38,3 +38,7 @@ class Repository( Framework.TestCase ):
|
||||
self.assertEqual( repo.updated_at, "2012-05-08T19:27:43Z" )
|
||||
self.assertEqual( repo.url, "https://api.github.com/repos/jacquev6/PyGithub" )
|
||||
self.assertEqual( repo.watchers, 13 )
|
||||
|
||||
def testCreate( self ):
|
||||
repo = self.user.create_repo( "TestPyGithub" )
|
||||
self.assertEqual( repo.url, "https://api.github.com/repos/jacquev6/TestPyGithub" )
|
||||
|
||||
Reference in New Issue
Block a user