From 25dbd4053e982402c7d92139f167dbe46008c932 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Mon, 19 Mar 2012 19:05:18 +0100 Subject: [PATCH] Fix unit tests --- .../GithubObject/GithubObject.UnitTest.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/github/GithubObjects/GithubObject/GithubObject.UnitTest.py b/github/GithubObjects/GithubObject/GithubObject.UnitTest.py index 9a546a58..71ea03cd 100644 --- a/github/GithubObjects/GithubObject/GithubObject.UnitTest.py +++ b/github/GithubObjects/GithubObject/GithubObject.UnitTest.py @@ -49,7 +49,7 @@ class GithubObjectWithDocumentationCoveringSpecialCases( TestCaseWithGithubTestO "GithubTestObject", BaseUrl( lambda obj: "/test" ), InternalSimpleAttributes( "a1", "a2", "_a3" ), - MethodFromCallable( "myMethod", [ "mock", "arg" ], [], lambda obj: 42, ObjectTypePolicy( GithubObject ) ), + MethodFromCallable( "myMethod", Parameters( [ "mock", "arg" ], [] ), lambda obj: 42, ObjectTypePolicy( GithubObject ) ), AttributeFromCallable( "myAttr", lambda obj: 42 ) ) @@ -61,7 +61,7 @@ class GithubObjectWithBaseUrlDependingOnAttribute( TestCaseWithGithubTestObject "GithubTestObject", BaseUrl( lambda obj: "/test/" + str( obj.a1 ) ), InternalSimpleAttributes( "a1", "a2", "a3", "a4" ), - Editable( [ "a1" ], [] ) + Editable( Parameters( [ "a1" ], [] ) ) ) def test( self ): @@ -123,7 +123,7 @@ class EditableGithubObject( TestCaseWithGithubTestObject ): "GithubTestObject", BaseUrl( lambda obj: "/test" ), InternalSimpleAttributes( "a1", "a2", "a3", "a4" ), - Editable( [ "a1" ], [ "a2", "a4" ] ), + Editable( Parameters( [ "a1" ], [ "a2", "a4" ] ) ), ) def testEditWithoutArgument( self ): @@ -239,7 +239,7 @@ class GithubObjectWithListGetableExternalListOfObjects( TestCaseWithGithubTestOb "GithubTestObject", BaseUrl( lambda obj: "/test" ), InternalSimpleAttributes( "a1", "a2" ), - ExternalListOfObjects( "a3s", "a3", ContainedObject, ListGetable( [], [ "type" ] ) ) + ExternalListOfObjects( "a3s", "a3", ContainedObject, ListGetable( Parameters( [], [ "type" ] ) ) ) ) def testGetList( self ): @@ -266,7 +266,7 @@ class GithubObjectWithListGetableExternalListOfObjectsWithOtherUrl( TestCaseWith "GithubTestObject", BaseUrl( lambda obj: "/test" ), InternalSimpleAttributes( "a1", "a2" ), - ExternalListOfObjects( "a3s", "a3", ContainedObject, ListGetable( [], [ "type" ] ), url = "/other" ) + ExternalListOfObjects( "a3s", "a3", ContainedObject, ListGetable( Parameters( [], [ "type" ] ) ), url = "/other" ) ) def testGetList( self ): @@ -288,7 +288,7 @@ class GithubObjectWithListGetableExternalListOfObjectsWithAttributeModifier( Tes "GithubTestObject", BaseUrl( lambda obj: "/test" ), InternalSimpleAttributes( "a1", "a2" ), - ExternalListOfObjects( "a3s", "a3", ContainedObject, ListGetable( [], [ "type" ], { "_a": lambda obj: 42 } ) ) + ExternalListOfObjects( "a3s", "a3", ContainedObject, ListGetable( Parameters( [], [ "type" ] ), { "_a": lambda obj: 42 } ) ) ) def testGetList( self ): @@ -374,7 +374,7 @@ class GithubObjectWithElementCreatableExternalListOfObjects( TestCaseWithGithubT "GithubTestObject", BaseUrl( lambda obj: "/test" ), InternalSimpleAttributes( "a1", "a2" ), - ExternalListOfObjects( "a3s", "a3", ContainedObject, ElementCreatable( [ "name" ], [ "p1", "p2" ] ) ) + ExternalListOfObjects( "a3s", "a3", ContainedObject, ElementCreatable( Parameters( [ "name" ], [ "p1", "p2" ] ) ) ) ) def testCreate( self ): @@ -469,7 +469,7 @@ class GithubObjectWithElementGetableExternalListOfObjects( TestCaseWithGithubTes "GithubTestObject", BaseUrl( lambda obj: "/test" ), InternalSimpleAttributes( "a1", "a2" ), - ExternalListOfObjects( "a3s", "a3", ContainedObject, ElementGetable( [ "id" ], [] ) ) + ExternalListOfObjects( "a3s", "a3", ContainedObject, ElementGetable( Parameters( [ "id" ], [] ) ) ) ) def testGetList( self ): @@ -482,7 +482,7 @@ class GithubObjectWithMultiCapacityExternalListOfSimpleTypes( TestCaseWithGithub BaseUrl( lambda obj: "/test" ), InternalSimpleAttributes( "a1", "a2" ), ExternalListOfSimpleTypes( "a3s", "a3", "", - ListGetable( [], [] ), + ListGetable( Parameters( [], [] ) ), SeveralElementsAddable(), SeveralElementsRemovable(), ) @@ -521,7 +521,7 @@ class GithubObjectWithMethodFromCallable( TestCaseWithGithubTestObject ): "GithubTestObject", BaseUrl( lambda obj: "/test" ), InternalSimpleAttributes( "a1", "a2" ), - MethodFromCallable( "myMethod", [ "mock", "arg" ], [], myCallable, SimpleTypePolicy( None ) ) + MethodFromCallable( "myMethod", Parameters( [ "mock", "arg" ], [] ), myCallable, SimpleTypePolicy( None ) ) ) def testCallMethod( self ):