mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
Create a fork in integration tests
This commit is contained in:
@@ -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
@@ -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 ):
|
||||
|
||||
Reference in New Issue
Block a user