diff --git a/github/GithubObject.UnitTest.py b/github/GithubObject.UnitTest.py index c809998a..e6884e6c 100644 --- a/github/GithubObject.UnitTest.py +++ b/github/GithubObject.UnitTest.py @@ -23,16 +23,16 @@ class TestCaseWithGithubTestObject( unittest.TestCase ): unittest.TestCase.tearDown( self ) def expectGet( self, url ): - return self.g.expect._rawRequest( "GET", url ) + return self.g.expect._dataRequest( "GET", url ) def expectPut( self, url ): - return self.g.expect._rawRequest( "PUT", url ) + return self.g.expect._dataRequest( "PUT", url ) def expectPatch( self, url, data ): - return self.g.expect._rawRequest( "PATCH", url, data ) + return self.g.expect._dataRequest( "PATCH", url, data ) def expectDelete( self, url ): - return self.g.expect._rawRequest( "DELETE", url ) + return self.g.expect._dataRequest( "DELETE", url ) class GithubObjectWithOnlySimpleScalarAttributes( TestCaseWithGithubTestObject ): GithubTestObject = GithubObject( diff --git a/github/GithubObject.py b/github/GithubObject.py index a4f23d1e..d744d97e 100644 --- a/github/GithubObject.py +++ b/github/GithubObject.py @@ -14,7 +14,7 @@ class SimpleScalarAttributes: return rawValue def updateAttributes( self, obj ): - attributes = obj._github._rawRequest( "GET", obj._baseUrl ) + attributes = obj._github._dataRequest( "GET", obj._baseUrl ) for attributeName in self.__attributeNames: if attributeName not in attributes: attributes[ attributeName ] = None @@ -40,7 +40,7 @@ class ExtendedListAttribute: def __call__( self ): return [ self.__type( self.__obj._github, attributes, lazy = True ) - for attributes in self.__obj._github._rawRequest( "GET", self.__obj._baseUrl + "/" + self.__attributeName ) + for attributes in self.__obj._github._dataRequest( "GET", self.__obj._baseUrl + "/" + self.__attributeName ) ] class GetDefinition: @@ -63,7 +63,7 @@ class ExtendedListAttribute: def __call__( self, toBeDeleted ): assert( isinstance( toBeDeleted, self.__type ) ) - self.__obj._github._rawRequest( "DELETE", self.__obj._baseUrl + "/" + self.__attributeName + "/" + toBeDeleted._identity() ) + self.__obj._github._dataRequest( "DELETE", self.__obj._baseUrl + "/" + self.__attributeName + "/" + toBeDeleted._identity() ) class RemoveDefinition: def __init__( self, attributeName, removeName, type ): @@ -85,7 +85,7 @@ class ExtendedListAttribute: def __call__( self, toBeAdded ): assert( isinstance( toBeAdded, self.__type ) ) - self.__obj._github._rawRequest( "PUT", self.__obj._baseUrl + "/" + self.__attributeName + "/" + toBeAdded._identity() ) + self.__obj._github._dataRequest( "PUT", self.__obj._baseUrl + "/" + self.__attributeName + "/" + toBeAdded._identity() ) class AddDefinition: def __init__( self, attributeName, addName, type ): @@ -129,7 +129,7 @@ class ExtendedScalarAttribute: return self.__type( obj._github, rawValue, lazy = True ) def updateAttributes( self, obj ): - attributes = obj._github._rawRequest( "GET", obj._baseUrl ) + attributes = obj._github._dataRequest( "GET", obj._baseUrl ) # for attributeName in self.__attributeNames: # if attributeName not in attributes: # attributes[ attributeName ] = None @@ -157,7 +157,7 @@ class Editable: for argumentName in kwds: if argumentName not in itertools.chain( self.__mandatoryParameters, self.__optionalParameters ): raise TypeError() - attributes = self.__obj._github._rawRequest( "PATCH", self.__obj._baseUrl, kwds ) + attributes = self.__obj._github._dataRequest( "PATCH", self.__obj._baseUrl, kwds ) self.__obj._updateAttributes( attributes ) class AttributeDefinition: @@ -184,7 +184,7 @@ class Deletable: self.__obj = obj def __call__( self ): - self.__obj._github._rawRequest( "DELETE", self.__obj._baseUrl ) + self.__obj._github._dataRequest( "DELETE", self.__obj._baseUrl ) class AttributeDefinition: def getValueFromRawValue( self, obj, rawValue ): diff --git a/run_tests.sh b/run_tests.sh index 8778962b..130c890a 100644 --- a/run_tests.sh +++ b/run_tests.sh @@ -15,6 +15,6 @@ echo for f in $(find -name "*IntegrationTest.py") do - python $f + # python $f echo done \ No newline at end of file