Fix tests after merging #50, and fix Repository.create_issue and .get_issues as well

This commit is contained in:
Vincent Jacques
2012-06-28 21:06:05 +01:00
parent 18b9182f71
commit efdaa8945d
8 changed files with 35 additions and 34 deletions
+2 -2
View File
@@ -367,7 +367,7 @@ class Repository( GithubObject.GithubObject ):
if milestone is not GithubObject.NotSet:
post_parameters[ "milestone" ] = milestone._identity
if labels is not GithubObject.NotSet:
post_parameters[ "labels" ] = [ element._identity for element in labels ]
post_parameters[ "labels" ] = [ element.name for element in labels ]
headers, data = self._requester.requestAndCheck(
"POST",
self.url + "/issues",
@@ -764,7 +764,7 @@ class Repository( GithubObject.GithubObject ):
if mentioned is not GithubObject.NotSet:
url_parameters[ "mentioned" ] = mentioned._identity
if labels is not GithubObject.NotSet:
url_parameters[ "labels" ] = ",".join( label._identity for label in labels )
url_parameters[ "labels" ] = ",".join( label.name for label in labels )
if sort is not GithubObject.NotSet:
url_parameters[ "sort" ] = sort
if direction is not GithubObject.NotSet:
+4 -3
View File
@@ -43,14 +43,15 @@ class Issue50( Framework.TestCase ): # https://github.com/jacquev6/PyGithub/issu
self.issue.set_labels( self.repo.get_label( "Bug" ), self.repo.get_label( "RequestedByUser" ), self.repo.get_label( self.labelName ) )
def testIssueLabels( self ):
self.assertListKeyEqual( self.issue.labels, lambda l: l.name, [ "Bug", "RequestedByUser", self.labelName ] )
self.assertListKeyEqual( self.issue.labels, lambda l: l.name, [ "Bug", self.labelName, "RequestedByUser" ] )
def testIssueGetLabels( self ):
self.assertListKeyEqual( self.issue.get_labels(), lambda l: l.name, [ "Bug", "RequestedByUser", self.labelName ] )
self.assertListKeyEqual( self.issue.get_labels(), lambda l: l.name, [ "Bug", self.labelName, "RequestedByUser" ] )
def testGetIssuesWithLabel( self ):
self.assertListKeyEqual( self.repo.get_issues( labels = [ self.repo.get_label( self.labelName ) ] ), lambda i: i.number, [ 50 ] )
self.assertListKeyEqual( self.repo.get_issues( labels = [ self.repo.get_label( self.labelName ) ] ), lambda i: i.number, [ 52, 50 ] )
def testCreateIssueWithLabel( self ):
issue = self.repo.create_issue( "Issue created by PyGithub to test issue #50", labels = [ self.repo.get_label( self.labelName ) ] )
self.assertListKeyEqual( issue.labels, lambda l: l.name, [ self.labelName ] )
self.assertEqual( issue.number, 52 )
+6 -6
View File
@@ -1,15 +1,15 @@
GET /user {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('content-length', '801'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4926'), ('server', 'nginx/1.0.13'), ('last-modified', 'Fri, 15 Jun 2012 15:37:06 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"41ade9c2e4794dd5214bb5f497af92cb"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:49:48 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"type":"User","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","total_private_repos":5,"company":"Criteo","login":"jacquev6","owned_private_repos":5,"plan":{"space":614400,"private_repos":5,"collaborators":1,"name":"micro"},"following":24,"blog":"http://vincent-jacques.net","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","public_repos":11,"public_gists":3,"followers":13,"email":"vincent@vincent-jacques.net","private_gists":5,"created_at":"2010-07-09T06:10:06Z","disk_usage":16820,"collaborators":0,"html_url":"https://github.com/jacquev6","name":"Vincent Jacques","location":"Paris, France","hireable":false,"url":"https://api.github.com/users/jacquev6","id":327146,"bio":""}
[('status', '200 OK'), ('x-ratelimit-remaining', '4892'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('last-modified', 'Fri, 15 Jun 2012 15:37:06 GMT'), ('connection', 'keep-alive'), ('etag', '"41ade9c2e4794dd5214bb5f497af92cb"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 20:04:04 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"following":24,"created_at":"2010-07-09T06:10:06Z","type":"User","private_gists":5,"public_repos":11,"followers":13,"hireable":false,"html_url":"https://github.com/jacquev6","bio":"","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","disk_usage":16820,"blog":"http://vincent-jacques.net","location":"Paris, France","total_private_repos":5,"login":"jacquev6","owned_private_repos":5,"collaborators":0,"name":"Vincent Jacques","company":"Criteo","url":"https://api.github.com/users/jacquev6","plan":{"space":614400,"private_repos":5,"collaborators":1,"name":"micro"},"gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146,"public_gists":3,"email":"vincent@vincent-jacques.net"}
GET /repos/jacquev6/PyGithub {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('content-length', '1154'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4925'), ('server', 'nginx/1.0.13'), ('last-modified', 'Tue, 26 Jun 2012 12:30:06 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"eb3fdb98c65995892b016162b91ad68c"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:49:49 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"git_url":"git://github.com/jacquev6/PyGithub.git","homepage":"http://vincent-jacques.net/PyGithub","owner":{"login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","url":"https://api.github.com/users/jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"open_issues":11,"permissions":{"push":true,"admin":true,"pull":true},"description":"Python library implementing the full Github API v3","master_branch":"master","has_issues":true,"svn_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub","mirror_url":null,"has_downloads":true,"size":184,"fork":false,"created_at":"2012-02-25T12:53:47Z","html_url":"https://github.com/jacquev6/PyGithub","name":"PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","language":"Python","clone_url":"https://github.com/jacquev6/PyGithub.git","private":false,"pushed_at":"2012-06-20T21:03:27Z","id":3544490,"forks":5,"has_wiki":false,"watchers":29,"ssh_url":"git@github.com:jacquev6/PyGithub.git","updated_at":"2012-06-26T12:30:06Z"}
[('status', '200 OK'), ('content-length', '1154'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4891'), ('server', 'nginx/1.0.13'), ('last-modified', 'Tue, 26 Jun 2012 12:30:06 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"eb3fdb98c65995892b016162b91ad68c"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 20:04:05 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"homepage":"http://vincent-jacques.net/PyGithub","owner":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","url":"https://api.github.com/users/jacquev6","id":327146},"open_issues":12,"mirror_url":null,"git_url":"git://github.com/jacquev6/PyGithub.git","permissions":{"push":true,"admin":true,"pull":true},"description":"Python library implementing the full Github API v3","master_branch":"master","has_issues":true,"svn_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub","has_downloads":true,"size":184,"fork":false,"created_at":"2012-02-25T12:53:47Z","html_url":"https://github.com/jacquev6/PyGithub","name":"PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","language":"Python","clone_url":"https://github.com/jacquev6/PyGithub.git","private":false,"pushed_at":"2012-06-20T21:03:27Z","id":3544490,"forks":5,"has_wiki":false,"watchers":29,"ssh_url":"git@github.com:jacquev6/PyGithub.git","updated_at":"2012-06-26T12:30:06Z"}
GET /repos/jacquev6/PyGithub/issues/50 {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4924'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '1971'), ('server', 'nginx/1.0.13'), ('last-modified', 'Wed, 27 Jun 2012 22:46:10 GMT'), ('connection', 'keep-alive'), ('etag', '"bb61450865a934ca7ee53d6dde588876"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:49:49 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"labels":[{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug"},{"color":"e10c02","name":"RequestedByUser","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/RequestedByUser"}],"body":null,"state":"open","closed_at":null,"assignee":{"login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","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","id":327146},"comments":2,"title":"[Issue] Replace label _identity with name","created_at":"2012-06-25T18:45:05Z","number":50,"milestone":{"open_issues":3,"state":"open","due_on":"2012-07-01T07:00:00Z","description":"","creator":{"login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","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","id":327146},"closed_issues":0,"title":"Version 1.2","created_at":"2012-06-25T19:31:02Z","number":6,"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/6","id":136827},"html_url":"https://github.com/jacquev6/PyGithub/issues/50","url":"https://api.github.com/repos/jacquev6/PyGithub/issues/50","closed_by":null,"user":{"login":"philipkimmey","gravatar_id":"6baf93a46e584369e1ea64bc1aca62f4","url":"https://api.github.com/users/philipkimmey","avatar_url":"https://secure.gravatar.com/avatar/6baf93a46e584369e1ea64bc1aca62f4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","id":211079},"id":5256315,"pull_request":{"patch_url":"https://github.com/jacquev6/PyGithub/pull/50.patch","diff_url":"https://github.com/jacquev6/PyGithub/pull/50.diff","html_url":"https://github.com/jacquev6/PyGithub/pull/50"},"updated_at":"2012-06-25T19:33:48Z"}
[('status', '200 OK'), ('content-length', '2169'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4890'), ('server', 'nginx/1.0.13'), ('last-modified', 'Wed, 27 Jun 2012 22:46:10 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"bb61450865a934ca7ee53d6dde588876"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 20:04:05 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"labels":[{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug"},{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"},{"color":"e10c02","name":"RequestedByUser","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/RequestedByUser"}],"body":null,"state":"open","closed_at":null,"assignee":{"login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","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","id":327146},"comments":2,"title":"[Issue] Replace label _identity with name","created_at":"2012-06-25T18:45:05Z","number":50,"milestone":{"open_issues":3,"state":"open","due_on":"2012-07-01T07:00:00Z","description":"","creator":{"login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","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","id":327146},"closed_issues":0,"title":"Version 1.2","created_at":"2012-06-25T19:31:02Z","number":6,"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/6","id":136827},"html_url":"https://github.com/jacquev6/PyGithub/issues/50","url":"https://api.github.com/repos/jacquev6/PyGithub/issues/50","closed_by":null,"user":{"login":"philipkimmey","gravatar_id":"6baf93a46e584369e1ea64bc1aca62f4","url":"https://api.github.com/users/philipkimmey","avatar_url":"https://secure.gravatar.com/avatar/6baf93a46e584369e1ea64bc1aca62f4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","id":211079},"id":5256315,"pull_request":{"diff_url":"https://github.com/jacquev6/PyGithub/pull/50.diff","patch_url":"https://github.com/jacquev6/PyGithub/pull/50.patch","html_url":"https://github.com/jacquev6/PyGithub/pull/50"},"updated_at":"2012-06-25T19:33:48Z"}
@@ -1,10 +1,10 @@
GET /repos/jacquev6/PyGithub/labels/Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29 {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4949'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '197'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:38:12 GMT'), ('content-type', 'application/json; charset=utf-8')]
[('status', '200 OK'), ('content-length', '197'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4918'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:54:44 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"}
POST /repos/jacquev6/PyGithub/issues/50/labels {'Authorization': 'Basic login_and_password_removed'} ["Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29"]
422
[('status', '422 Unprocessable Entity'), ('x-ratelimit-remaining', '4948'), ('content-length', '179'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('cache-control', ''), ('date', 'Thu, 28 Jun 2012 19:38:13 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"errors":[{"field":"name","resource":"Label","value":["Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29"],"code":"missing"}],"message":"Validation Failed"}
POST /repos/jacquev6/PyGithub/issues/50/labels {'Authorization': 'Basic login_and_password_removed'} ["Label with spaces and strange characters (&*#$)"]
200
[('status', '200 OK'), ('content-length', '419'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4917'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"e1d0a1c54608a676af0cdc1f63e04da7"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Thu, 28 Jun 2012 19:54:44 GMT'), ('content-type', 'application/json; charset=utf-8')]
[{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug"},{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"},{"color":"e10c02","name":"RequestedByUser","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/RequestedByUser"}]
@@ -1,10 +1,10 @@
GET /repos/jacquev6/PyGithub/labels/Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29 {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('content-length', '197'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4923'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:49:50 GMT'), ('content-type', 'application/json; charset=utf-8')]
[('status', '200 OK'), ('content-length', '197'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4908'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:56:20 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"}
POST /repos/jacquev6/PyGithub/issues {'Authorization': 'Basic login_and_password_removed'} {"labels": ["Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29"], "title": "Issue created by PyGithub to test issue #50"}
422
[('status', '422 Unprocessable Entity'), ('content-length', '179'), ('x-ratelimit-remaining', '4922'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('cache-control', ''), ('date', 'Thu, 28 Jun 2012 19:49:51 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"errors":[{"field":"name","resource":"Label","value":["Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29"],"code":"missing"}],"message":"Validation Failed"}
POST /repos/jacquev6/PyGithub/issues {'Authorization': 'Basic login_and_password_removed'} {"labels": ["Label with spaces and strange characters (&*#$)"], "title": "Issue created by PyGithub to test issue #50"}
201
[('status', '201 Created'), ('content-length', '963'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4907'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"e1e5db9ef97e084a3d36ede8dc41c0d9"'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/issues/52'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Thu, 28 Jun 2012 19:56:21 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"labels":[{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"}],"body":null,"state":"open","closed_at":null,"assignee":null,"comments":0,"title":"Issue created by PyGithub to test issue #50","created_at":"2012-06-28T19:56:21Z","number":52,"milestone":null,"html_url":"https://github.com/jacquev6/PyGithub/issues/52","url":"https://api.github.com/repos/jacquev6/PyGithub/issues/52","closed_by":null,"user":{"login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","id":327146},"id":5330629,"pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"updated_at":"2012-06-28T19:56:21Z"}
@@ -1,10 +1,10 @@
GET /repos/jacquev6/PyGithub/labels/Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29 {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4928'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '197'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:48:05 GMT'), ('content-type', 'application/json; charset=utf-8')]
[('status', '200 OK'), ('x-ratelimit-remaining', '4894'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '197'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 20:03:09 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"}
GET /repos/jacquev6/PyGithub/issues?labels=Label%2520with%2520spaces%2520and%2520strange%2520characters%2520%2528%2526%252A%2523%2524%2529 {'Authorization': 'Basic login_and_password_removed'} null
GET /repos/jacquev6/PyGithub/issues?labels=Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29 {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('content-length', '2'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4927'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"d751713988987e9331980363e24189ce"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Thu, 28 Jun 2012 19:48:05 GMT'), ('content-type', 'application/json; charset=utf-8')]
[]
[('status', '200 OK'), ('content-length', '3101'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4893'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:56:21 GMT'), ('connection', 'keep-alive'), ('etag', '"60a85542a2e824eb5fc96c5a99657fff"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 20:03:10 GMT'), ('content-type', 'application/json; charset=utf-8')]
[{"labels":[{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"}],"body":null,"state":"open","closed_at":null,"assignee":null,"comments":0,"title":"Issue created by PyGithub to test issue #50","created_at":"2012-06-28T19:56:21Z","number":52,"milestone":null,"html_url":"https://github.com/jacquev6/PyGithub/issues/52","url":"https://api.github.com/repos/jacquev6/PyGithub/issues/52","user":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","url":"https://api.github.com/users/jacquev6","id":327146},"id":5330629,"pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"updated_at":"2012-06-28T19:56:21Z"},{"labels":[{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug"},{"color":"e10c02","name":"RequestedByUser","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/RequestedByUser"},{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"}],"body":null,"state":"open","closed_at":null,"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","url":"https://api.github.com/users/jacquev6","id":327146},"comments":2,"title":"[Issue] Replace label _identity with name","created_at":"2012-06-25T18:45:05Z","number":50,"milestone":{"open_issues":3,"state":"open","due_on":"2012-07-01T07:00:00Z","description":"","creator":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","url":"https://api.github.com/users/jacquev6","id":327146},"closed_issues":0,"title":"Version 1.2","created_at":"2012-06-25T19:31:02Z","number":6,"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/6","id":136827},"html_url":"https://github.com/jacquev6/PyGithub/issues/50","url":"https://api.github.com/repos/jacquev6/PyGithub/issues/50","user":{"avatar_url":"https://secure.gravatar.com/avatar/6baf93a46e584369e1ea64bc1aca62f4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"philipkimmey","gravatar_id":"6baf93a46e584369e1ea64bc1aca62f4","url":"https://api.github.com/users/philipkimmey","id":211079},"id":5256315,"pull_request":{"diff_url":"https://github.com/jacquev6/PyGithub/pull/50.diff","patch_url":"https://github.com/jacquev6/PyGithub/pull/50.patch","html_url":"https://github.com/jacquev6/PyGithub/pull/50"},"updated_at":"2012-06-25T19:33:48Z"}]
@@ -1,5 +1,5 @@
GET /repos/jacquev6/PyGithub/issues/50/labels {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('content-length', '221'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4932'), ('server', 'nginx/1.0.13'), ('last-modified', 'Wed, 27 Jun 2012 22:46:10 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"bb61450865a934ca7ee53d6dde588876"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:46:04 GMT'), ('content-type', 'application/json; charset=utf-8')]
[{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug"},{"color":"e10c02","name":"RequestedByUser","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/RequestedByUser"}]
[('status', '200 OK'), ('x-ratelimit-remaining', '4903'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '419'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:57:21 GMT'), ('content-type', 'application/json; charset=utf-8')]
[{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug"},{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"},{"color":"e10c02","name":"RequestedByUser","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/RequestedByUser"}]
@@ -1,20 +1,20 @@
GET /repos/jacquev6/PyGithub/labels/Bug {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('content-length', '97'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4944'), ('server', 'nginx/1.0.13'), ('last-modified', 'Sat, 20 Oct 2007 11:24:19 GMT'), ('connection', 'keep-alive'), ('etag', '"147027ac86c95043e935b318f88c3683"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:40:43 GMT'), ('content-type', 'application/json; charset=utf-8')]
[('status', '200 OK'), ('content-length', '97'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4889'), ('server', 'nginx/1.0.13'), ('last-modified', 'Sat, 20 Oct 2007 11:24:19 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"147027ac86c95043e935b318f88c3683"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 20:04:06 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug"}
GET /repos/jacquev6/PyGithub/labels/RequestedByUser {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('content-length', '121'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4943'), ('server', 'nginx/1.0.13'), ('last-modified', 'Sat, 20 Oct 2007 11:24:19 GMT'), ('connection', 'keep-alive'), ('etag', '"147027ac86c95043e935b318f88c3683"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:40:44 GMT'), ('content-type', 'application/json; charset=utf-8')]
[('status', '200 OK'), ('content-length', '121'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4888'), ('server', 'nginx/1.0.13'), ('last-modified', 'Sat, 20 Oct 2007 11:24:19 GMT'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"147027ac86c95043e935b318f88c3683"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 20:04:06 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"color":"e10c02","name":"RequestedByUser","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/RequestedByUser"}
GET /repos/jacquev6/PyGithub/labels/Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29 {'Authorization': 'Basic login_and_password_removed'} null
200
[('status', '200 OK'), ('content-length', '197'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('x-ratelimit-remaining', '4942'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 19:40:45 GMT'), ('content-type', 'application/json; charset=utf-8')]
[('status', '200 OK'), ('x-ratelimit-remaining', '4887'), ('x-ratelimit-limit', '5000'), ('vary', 'Accept, Authorization, Cookie'), ('content-length', '197'), ('server', 'nginx/1.0.13'), ('last-modified', 'Thu, 28 Jun 2012 19:29:52 GMT'), ('connection', 'keep-alive'), ('etag', '"c536d81e7479c8c9acfa7deeddeb6e72"'), ('cache-control', 'private, max-age=60'), ('date', 'Thu, 28 Jun 2012 20:04:07 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"}
PUT /repos/jacquev6/PyGithub/issues/50/labels {'Authorization': 'Basic login_and_password_removed'} ["Bug", "RequestedByUser", "Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29"]
422
[('status', '422 Unprocessable Entity'), ('content-length', '179'), ('x-ratelimit-remaining', '4941'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('cache-control', ''), ('date', 'Thu, 28 Jun 2012 19:40:45 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"errors":[{"field":"name","resource":"Label","value":["Label%20with%20spaces%20and%20strange%20characters%20%28%26%2A%23%24%29"],"code":"missing"}],"message":"Validation Failed"}
PUT /repos/jacquev6/PyGithub/issues/50/labels {'Authorization': 'Basic login_and_password_removed'} ["Bug", "RequestedByUser", "Label with spaces and strange characters (&*#$)"]
200
[('status', '200 OK'), ('content-length', '419'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4886'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('etag', '"e1d0a1c54608a676af0cdc1f63e04da7"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Thu, 28 Jun 2012 20:04:08 GMT'), ('content-type', 'application/json; charset=utf-8')]
[{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug"},{"color":"ffff00","name":"Label with spaces and strange characters (&*#$)","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Label+with+spaces+and+strange+characters+%28%26%2A%23%24%29"},{"color":"e10c02","name":"RequestedByUser","url":"https://api.github.com/repos/jacquev6/PyGithub/labels/RequestedByUser"}]