This commit is contained in:
Vincent Jacques
2012-02-22 20:07:16 +00:00
parent 53d1d97d86
commit 8cf4e71ca7
4 changed files with 26 additions and 19 deletions
+2 -2
View File
@@ -232,11 +232,11 @@ class GithubObjectWithListGetableList( TestCaseWithGithubTestObject ):
"GithubTestObject",
BaseUrl( lambda obj: "/test" ),
BasicAttributes( "a1", "a2" ),
ListOfObjects( "a3s", ContainedObject, ListGetable() )
ListOfObjects( "a3s", ContainedObject, ListGetable( [], [] ) )
)
def testGetList( self ):
self.expectDataGet( "/test/a3s" ).andReturn( [ { "id": "id1" }, { "id": "id2" }, { "id": "id3" } ] )
self.expectDataGet( "/test/a3s", {} ).andReturn( [ { "id": "id1" }, { "id": "id2" }, { "id": "id3" } ] )
a3s = self.o.get_a3s()
self.assertEqual( len( a3s ), 3 )
self.assertEqual( a3s[ 0 ].id, "id1" )