Fix attributes of complex type => fix testNamedUserDetails!

This commit is contained in:
Vincent Jacques
2012-05-03 22:37:22 +01:00
parent d64c1e89a5
commit ca863533b5
31 changed files with 59 additions and 23 deletions
+4 -3
View File
@@ -578,6 +578,7 @@ class Repository( object ):
pass
def __useAttributes( self, attributes ):
#@todo No need to check if attribute is in attributes when attribute is mandatory
if "clone_url" in attributes:
self.__clone_url = attributes[ "clone_url" ]
if "created_at" in attributes:
@@ -615,9 +616,9 @@ class Repository( object ):
if "organization" in attributes:
self.__organization = attributes[ "organization" ]
if "owner" in attributes:
self.__owner = attributes[ "owner" ]
self.__owner = NamedUser.NamedUser( self.__github, attributes[ "owner" ], lazy = True )
if "parent" in attributes:
self.__parent = attributes[ "parent" ]
self.__parent = Repository( self.__github, attributes[ "parent" ], lazy = True )
if "permissions" in attributes:
self.__permissions = attributes[ "permissions" ]
if "private" in attributes:
@@ -627,7 +628,7 @@ class Repository( object ):
if "size" in attributes:
self.__size = attributes[ "size" ]
if "source" in attributes:
self.__source = attributes[ "source" ]
self.__source = Repository( self.__github, attributes[ "source" ], lazy = True )
if "ssh_url" in attributes:
self.__ssh_url = attributes[ "ssh_url" ]
if "svn_url" in attributes: