1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00
SickRage/lib/github/tests/ReplayData/PullRequest.testCreateComment.txt

23 lines
21 KiB
Plaintext
Raw Normal View History

https
GET
api.github.com
None
/repos/jacquev6/PyGithub/commits/8a4f306d4b223682dd19410d4a9150636ebe4206
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
null
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4989'), ('content-length', '19468'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"54236e7f65246e5fdb1122bd461e4a5d"'), ('date', 'Fri, 01 Jun 2012 19:43:25 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"sha":"8a4f306d4b223682dd19410d4a9150636ebe4206","stats":{"additions":131,"total":135,"deletions":4},"files":[{"changes":17,"additions":14,"status":"modified","sha":"8a4f306d4b223682dd19410d4a9150636ebe4206","patch":"@@ -110,7 +110,7 @@ def user( self ):\n return self.__user\n \n def add_to_labels( self, *labels ):\n- post_parameters = labels\n+ post_parameters = [ label.name for label in labels ]\n status, headers, data = self.__requester.request(\n \"POST\",\n str( self.url ) + \"/labels\",\n@@ -131,7 +131,12 @@ def create_comment( self, body ):\n return IssueComment.IssueComment( self.__requester, data, completion = NoCompletion )\n \n def delete_labels( self ):\n- pass\n+ status, headers, data = self.__requester.request(\n+ \"DELETE\",\n+ str( self.url ) + \"/labels\",\n+ None,\n+ None\n+ )\n \n def edit( self, title = DefaultValueForOptionalParameters, body = DefaultValueForOptionalParameters, assignee = DefaultValueForOptionalParameters, state = DefaultValueForOptionalParameters, milestone = DefaultValueForOptionalParameters, labels = DefaultValueForOptionalParameters ):\n post_parameters = {\n@@ -216,7 +221,13 @@ def remove_from_labels( self, label ):\n )\n \n def set_labels( self, *labels ):\n- pass\n+ post_parameters = [ label.name for label in labels ]\n+ status, headers, data = self.__requester.request(\n+ \"PUT\",\n+ str( self.url ) + \"/labels\",\n+ None,\n+ post_parameters\n+ )\n \n def __initAttributes( self ):\n self.__assignee = None","raw_url":"https://github.com/jacquev6/PyGithub/raw/8a4f306d4b223682dd19410d4a9150636ebe4206/src/github/Issue.py","filename":"src/github/Issue.py","blob_url":"https://github.com/jacquev6/PyGithub/blob/8a4f306d4b223682dd19410d4a9150636ebe4206/src/github/Issue.py","deletions":3},{"changes":7,"additions":7,"status":"modified","sha":"8a4f306d4b223682dd19410d4a9150636ebe4206","patch":"@@ -1,6 +1,8 @@\n # WARNING: this file is generated automaticaly.\n # Do not modify it manually, your work would be lost.\n \n+import urllib\n+\n import PaginatedList\n from GithubObject import *\n \n@@ -43,6 +45,11 @@ def edit( self, name, color ):\n )\n self.__useAttributes( data )\n \n+ # @toto Remove '_identity' from the normalized json description\n+ @property\n+ def _identity( self ):\n+ return urllib.quote( self.name )\n+\n def __initAttributes( self ):\n self.__color = None\n self.__name = None","raw_url":"https://github.com/jacquev6/PyGithub/raw/8a4f306d4b223682dd19410d4a9150636ebe4206/src/github/Label.py","filename":"src/github/Label.py","blob_url":"https://github.com/jacquev6/PyGithub/blob/8a4f306d4b223682dd19410d4a9150636ebe4206/src/github/Label.py","deletions":0},{"changes":26,"additions":25,"status":"modified","sha":"8a4f306d4b223682dd19410d4a9150636ebe4206","patch":"@@ -3,7 +3,8 @@\n class Issue( Framework.TestCase ):\r\n def setUp( self ):\r\n Framework.TestCase.setUp( self )\r\n- self.issue = self.g.get_user().get_repo( \"PyGithub\" ).get_issue( 28 )\r\n+ self.repo = self.g.get_user().get_repo( \"PyGithub\" )\r\n+ self.issue = self.repo.get_issue( 28 )\r\n \r\n def testAttributes( self ):\r\n self.assertEqual( self.issue.assignee.login, \"jacquev6\" )\r\n@@ -47,3 +48,26 @@ def testGetComments( self ):\n \r\n def testGetEvents( self ):\r\n self.assertListKeyEqual( self.issue.get_events(), lambda e: e.id, [ 15819975, 15820048 ] )\r\n+\r\n+ def testGetLabels( self ):\r\n+ self.assertListKeyEqual( self.issue.get_labels(), lambda l: l.name, [ \"Bug\", \"Project management\", \"Question\" ] )\r\n+\r\n+ def testAddAndRemoveLabels( self ):\r\n+ bug = self.repo.get_label( \"Bug\" )\r\n+ question = self.repo.get_label( \"Question\" )\r\n+ self.assertListKeyEqual( self.issue.get_labels(), lambda l: l.name, [ \"B
https
POST
api.github.com
None
/repos/jacquev6/PyGithub/pulls/31/comments
{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
{"body": "Comment created by PyGithub", "commit_id": "8a4f306d4b223682dd19410d4a9150636ebe4206", "position": 5, "path": "src/github/Issue.py"}
201
[('status', '201 Created'), ('x-ratelimit-remaining', '4953'), ('content-length', '937'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"7ca841d45253326d61bee20c809872dc"'), ('date', 'Sun, 27 May 2012 09:40:12 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/pulls/comments/886298')]
{"updated_at":"2012-05-27T09:40:12Z","position":5,"original_position":5,"body":"Comment created by PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/pulls/comments/886298","commit_id":"8a4f306d4b223682dd19410d4a9150636ebe4206","created_at":"2012-05-27T09:40:12Z","user":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"original_commit_id":"8a4f306d4b223682dd19410d4a9150636ebe4206","path":"src/github/Issue.py","id":886298,"_links":{"self":{"href":"https://api.github.com/repos/jacquev6/PyGithub/pulls/comments/886298"},"html":{"href":"https://github.com/jacquev6/PyGithub/pull/31#r886298"},"pull_request":{"href":"https://api.github.com/repos/jacquev6/PyGithub/pulls/31"}}}