This commit is contained in:
Vincent Jacques
2012-03-03 10:13:37 +00:00
parent 98c7953681
commit e10aa3eb07
+8
View File
@@ -314,6 +314,14 @@ class IntegrationTest:
r.create_git_ref( "refs/tags/tagCreatedByPyGithub", tag.sha )
reTag = r.get_git_tag( tag.sha )
def testEmails( self ):
u = self.g.get_user()
self.printList( "Emails", u.get_emails() )
u.add_to_emails( "ab@xxx.com", "cd@xxx.com" )
self.printList( "Emails", u.get_emails() )
u.remove_from_emails( "ab@xxx.com", "cd@xxx.com" )
self.printList( "Emails", u.get_emails() )
def printList( self, title, iterable, f = lambda x: x ):
print title + ":", ", ".join( f( x ) for x in iterable[ :10 ] ), "..." if len( iterable ) > 10 else ""