Create a fork in integration tests

This commit is contained in:
Vincent Jacques
2012-02-25 16:17:37 +00:00
parent 156b354a09
commit 0e80fa353c
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -1,5 +1,6 @@
#!/bin/env python
import time
import sys
import httplib
import base64
@@ -142,6 +143,7 @@ class IntegrationTest:
def doSomeWritesToRepository( self ):
u = self.g.get_user()
r = u.create_repo( name = "TestPyGithub", description = "Created by PyGithub", has_wiki = False )
time.sleep( 1 ) # Avoid error 500 from github :p
# Git objects
b1 = r.create_git_blob( "This blob was created by PyGithub", encoding = "latin1" )
@@ -181,6 +183,16 @@ class IntegrationTest:
# Downloads
r.create_download( "MyDownloadCreatedByPyGithub", 1000 )
# Forking, commiting and requesting merge
o = self.g.get_organization( "BeaverSoftware" )
rf = o.create_fork( r )
time.sleep( 1 ) # Avoid error 500 from github :p
b3 = rf.create_git_blob( "This blob was ter created by PyGithub", encoding = "latin1" )
t3 = rf.create_git_tree( [ { "path": "foo.bar", "mode": "100644", "type": "blob", "sha": b3.sha } ] )
c3 = rf.create_git_commit( "This commit was ter created by PyGithub", t3.sha, [ c2.sha ] )
rf.get_git_ref( "refs/heads/master" ).edit( c3.sha )
self.dumpRepository( r )
def dumpUser( self, u, doPrivateThings ):
+1 -1
View File
@@ -59,7 +59,7 @@ class Requester:
cnx.close()
# print verb, url, input, "==>", status, str( headers )[ :30 ], str( output )[ :30 ]
# print verb, url, parameters, input, "==>", status, str( headers )[ :30 ], str( output )[ :30 ]
return status, headers, output
def __completeUrl( self, url, parameters ):