mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Remove useless ObjectGetter
It was replaced by ListOfObjects with ElementGetable some time ago
This commit is contained in:
@@ -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 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user