diff --git a/github/GithubObject.UnitTest.py b/github/GithubObject.UnitTest.py index 676bc5de..05b87da0 100644 --- a/github/GithubObject.UnitTest.py +++ b/github/GithubObject.UnitTest.py @@ -403,24 +403,6 @@ class GithubObjectWithElementGetableList( TestCaseWithGithubTestObject ): self.expectDataGet( "/test/a3s/idGet" ).andReturn( { "id": "idGet" } ) self.assertEqual( self.o.get_a3( "idGet" ).id, "idGet" ) -class GithubObjectWithObjectGetter( TestCaseWithGithubTestObject ): - ContainedObject = GithubObject( - "ContainedObject", - BaseUrl( lambda obj: "/test/a3s/" + obj.id ), - InternalSimpleAttributes( "id", "name" ) - ) - - GithubTestObject = GithubObject( - "GithubTestObject", - BaseUrl( lambda obj: "/test" ), - InternalSimpleAttributes( "a1", "a2" ), - ObjectGetter( "a3", ContainedObject, lambda obj, id : { "id": id } ) - ) - - def testGetList( self ): - self.expectDataGet( "/test/a3s/idGet" ).andReturn( { "id": "idGet" } ) - self.assertEqual( self.o.get_a3( "idGet" ).id, "idGet" ) - def myCallable( obj, mock, arg ): return mock.call( arg ) diff --git a/github/GithubObject.py b/github/GithubObject.py index 9142ad1a..99643878 100644 --- a/github/GithubObject.py +++ b/github/GithubObject.py @@ -86,15 +86,6 @@ class Deletable( MethodFromCallable ): def __execute( self, obj, *args, **kwds ): obj._github._statusRequest( "DELETE", obj._baseUrl, None, None ) -class ObjectGetter( MethodFromCallable ): - def __init__( self, singularName, type, attributes ): - MethodFromCallable.__init__( self, "get_" + singularName, self.__execute ) - self.__attributes = attributes - self.__type = type - - def __execute( self, obj, *args, **kwds ): - return self.__type( obj._github, self.__attributes( obj, *args, **kwds ), lazy = False ) - def GithubObject( className, *attributePolicies ): class GithubObject: __attributeDefinitions = dict()