From e10aa3eb07c6b4b2b8c3872cdd3cfd91fd15fc97 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Sat, 3 Mar 2012 10:13:37 +0000 Subject: [PATCH] Emails --- NewIntegrationTest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NewIntegrationTest.py b/NewIntegrationTest.py index eb70d889..03c02770 100644 --- a/NewIntegrationTest.py +++ b/NewIntegrationTest.py @@ -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 ""