mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 03:11:09 +00:00
Fix testEditOrganizationTeamAndMembers (Use _identity to fix has_in_, add_to_, remove_from_)
This commit is contained in:
@@ -190,7 +190,7 @@ class Repository( object ):
|
||||
def add_to_collaborators( self, collaborator ):
|
||||
status, headers, data = self.__requester.request(
|
||||
"PUT",
|
||||
str( self.url ) + "/collaborators/" + str( collaborator.login ),
|
||||
str( self.url ) + "/collaborators/" + str( collaborator._identity ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -767,7 +767,7 @@ class Repository( object ):
|
||||
def has_in_collaborators( self, collaborator ):
|
||||
status, headers, data = self.__requester.request(
|
||||
"GET",
|
||||
str( self.url ) + "/collaborators/" + str( collaborator.login ),
|
||||
str( self.url ) + "/collaborators/" + str( collaborator._identity ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -776,11 +776,16 @@ class Repository( object ):
|
||||
def remove_from_collaborators( self, collaborator ):
|
||||
status, headers, data = self.__requester.request(
|
||||
"DELETE",
|
||||
str( self.url ) + "/collaborators/" + str( collaborator.login ),
|
||||
str( self.url ) + "/collaborators/" + str( collaborator._identity ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
|
||||
# @todo Remove '_identity' from the normalized json description
|
||||
@property
|
||||
def _identity( self ):
|
||||
return str( self.owner.login ) + "/" + str( self.name )
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__clone_url = None
|
||||
self.__created_at = None
|
||||
|
||||
Reference in New Issue
Block a user