mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
Improve comformance to pep8 (+dos2unix)
PyGithub is now a public projects with several public contibutors, I have to abandon my very personal coding conventions.
This commit is contained in:
@@ -15,27 +15,28 @@ import Framework
|
||||
|
||||
import datetime
|
||||
|
||||
class PullRequestComment( Framework.TestCase ):
|
||||
def setUp( self ):
|
||||
Framework.TestCase.setUp( self )
|
||||
self.comment = self.g.get_user().get_repo( "PyGithub" ).get_pull( 31 ).get_comment( 886298 )
|
||||
|
||||
def testAttributes( self ):
|
||||
self.assertEqual( self.comment.body, "Comment created by PyGithub" )
|
||||
self.assertEqual( self.comment.commit_id, "8a4f306d4b223682dd19410d4a9150636ebe4206" )
|
||||
self.assertEqual( self.comment.created_at, datetime.datetime( 2012, 5, 27, 9, 40, 12 ) )
|
||||
self.assertEqual( self.comment.id, 886298 )
|
||||
self.assertEqual( self.comment.original_commit_id, "8a4f306d4b223682dd19410d4a9150636ebe4206" )
|
||||
self.assertEqual( self.comment.original_position, 5 )
|
||||
self.assertEqual( self.comment.path, "src/github/Issue.py" )
|
||||
self.assertEqual( self.comment.position, 5 )
|
||||
self.assertEqual( self.comment.updated_at, datetime.datetime( 2012, 5, 27, 9, 40, 12 ) )
|
||||
self.assertEqual( self.comment.url, "https://api.github.com/repos/jacquev6/PyGithub/pulls/comments/886298" )
|
||||
self.assertEqual( self.comment.user.login, "jacquev6" )
|
||||
class PullRequestComment(Framework.TestCase):
|
||||
def setUp(self):
|
||||
Framework.TestCase.setUp(self)
|
||||
self.comment = self.g.get_user().get_repo("PyGithub").get_pull(31).get_comment(886298)
|
||||
|
||||
def testEdit( self ):
|
||||
self.comment.edit( "Comment edited by PyGithub" )
|
||||
self.assertEqual( self.comment.body, "Comment edited by PyGithub" )
|
||||
def testAttributes(self):
|
||||
self.assertEqual(self.comment.body, "Comment created by PyGithub")
|
||||
self.assertEqual(self.comment.commit_id, "8a4f306d4b223682dd19410d4a9150636ebe4206")
|
||||
self.assertEqual(self.comment.created_at, datetime.datetime(2012, 5, 27, 9, 40, 12))
|
||||
self.assertEqual(self.comment.id, 886298)
|
||||
self.assertEqual(self.comment.original_commit_id, "8a4f306d4b223682dd19410d4a9150636ebe4206")
|
||||
self.assertEqual(self.comment.original_position, 5)
|
||||
self.assertEqual(self.comment.path, "src/github/Issue.py")
|
||||
self.assertEqual(self.comment.position, 5)
|
||||
self.assertEqual(self.comment.updated_at, datetime.datetime(2012, 5, 27, 9, 40, 12))
|
||||
self.assertEqual(self.comment.url, "https://api.github.com/repos/jacquev6/PyGithub/pulls/comments/886298")
|
||||
self.assertEqual(self.comment.user.login, "jacquev6")
|
||||
|
||||
def testDelete( self ): # Test PullRequest.get_comments before
|
||||
def testEdit(self):
|
||||
self.comment.edit("Comment edited by PyGithub")
|
||||
self.assertEqual(self.comment.body, "Comment edited by PyGithub")
|
||||
|
||||
def testDelete(self):
|
||||
self.comment.delete()
|
||||
|
||||
Reference in New Issue
Block a user