Skip to content

Commit e0f6849

Browse files
authored
Merge pull request sigmavirus24#622 from adrianmoisey/remove_header_for_issues
Remove header for locking and unlocking issues
2 parents 8951195 + 06d6b55 commit e0f6849

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

github3/issues/issue.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ class Issue(GitHubCore):
3131
3232
"""
3333

34-
# The Accept header will likely be removable once the feature is out of
35-
# preview mode. See: https://git.io/vgXmB
36-
LOCKING_PREVIEW_HEADERS = {
37-
'Accept': 'application/vnd.github.the-key-preview+json'
38-
}
39-
4034
def _update_attributes(self, issue):
4135
self._api = issue.get('url', '')
4236
#: :class:`User <github3.users.User>` representing the user the issue
@@ -266,10 +260,9 @@ def lock(self):
266260
267261
:returns: bool
268262
"""
269-
headers = Issue.LOCKING_PREVIEW_HEADERS
270263

271264
url = self._build_url('lock', base_url=self._api)
272-
return self._boolean(self._put(url, headers=headers), 204, 404)
265+
return self._boolean(self._put(url), 204, 404)
273266

274267
def pull_request(self):
275268
"""Retrieve the pull request associated with this issue.
@@ -333,7 +326,6 @@ def unlock(self):
333326
334327
:returns: bool
335328
"""
336-
headers = Issue.LOCKING_PREVIEW_HEADERS
337329

338330
url = self._build_url('lock', base_url=self._api)
339-
return self._boolean(self._delete(url, headers=headers), 204, 404)
331+
return self._boolean(self._delete(url), 204, 404)

tests/cassettes/Issue_lock.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0a3", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "token <AUTH_TOKEN>"}, "method": "GET", "uri": "https://api.github.com/repos/adrianmoisey/temptest/issues/1"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA+2WzVLbMBCAX4XROUGxE0LwAH2J9tLSycjWYm+rH48kh7oe3r0rJ5jEMKXJMNMLp2Tl3U/7b3escYplrAqh9hnnosbzEkPV5OeF1dxBbT0X0qEw2qKHlgfQdQAfOHrfgOcJm7BeDYN17fpUHFGUyEH5kwmDQ3wL6rgRGh4JTJFoMOE90E8oosLmnZhbEBGroNUo/L1avFkFlCxL0tVidZksrybMNDoHR0cTFjAooCoLuqTx8bBjypZo4tlecelxhFzOl/OUCGIjgnDjgvSHftclkVZYEygVfcM0fGv8aXMzJ1rpdoyIZfH2v3VbhB1221FJIeV7q5R9IMrY6cO2fnkRHywHCpryRApZdtyGCih3FFJswRL9W/33ilO9Vcfjzxpl5HjKvQN5tGM7O3LrwZBHXT/ZPbDJfeGwDmjN8Vk7sCaadaUw+FucRiNrT5B+mxwdYW9F1v8ylq+kemvW8drhRhRtTI2DAnBDyT4RObInYmjrOIZf4ghS6jHAWkgdx/BeKA+PTzuQZd++97UOUd3WYEhd2eIn0BgF1wDNpvdYGqDnplFqwjQqWsrWDAfDpooLoHBALLkWgXjpLFlOZ8k0vfg8W2XzeXax/Er8ppZjnXSaLKPOYpWlV1GnUNbvMNtrcyvbddxbxL2ub69Rl2eFIudu7hho+wPv2Fm/fUjOpklGolDhWfCuIGF4+3gPwU8LafZfQqhFSS8apD3jeQ/ljSFJAk/uFws4r01J3AqwrCI6nZH0gDJUT4JQlCsSRO41Sqngjt1e8/qWIuoDCPArJmYn0r/o6nO4efuxMMeb+WNhfixM+qT6zwvz8Q8yRxaswAoAAA==", "encoding": "utf-8"}, "headers": {"X-XSS-Protection": "1; mode=block", "Content-Security-Policy": "default-src 'none'", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "Transfer-Encoding": "chunked", "Last-Modified": "Tue, 16 Feb 2016 08:48:29 GMT", "Access-Control-Allow-Origin": "*", "X-Frame-Options": "deny", "Status": "200 OK", "X-Served-By": "5aeb3f30c9e3ef6ef7bcbcddfd9a68f7", "X-GitHub-Request-Id": "29550C5A:16022:165B0CA8:56C2E50D", "X-RateLimit-Limit": "5000", "Cache-Control": "private, max-age=60, s-maxage=60", "Date": "Tue, 16 Feb 2016 08:59:57 GMT", "X-RateLimit-Remaining": "4991", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "Server": "GitHub.com", "X-OAuth-Scopes": "repo", "X-GitHub-Media-Type": "github.v3; param=full; format=json", "X-Content-Type-Options": "nosniff", "Content-Encoding": "gzip", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "ETag": "W/\"ca0fe4bdaad078cf95d3637e73abf569\"", "Access-Control-Allow-Credentials": "true", "Content-Type": "application/json; charset=utf-8", "X-Accepted-OAuth-Scopes": "repo", "X-RateLimit-Reset": "1455615772"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/adrianmoisey/temptest/issues/1"}, "recorded_at": "2016-02-16T08:59:57"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Content-Length": "0", "Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.the-key-preview+json", "User-Agent": "github3.py/1.0.0a3", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "token <AUTH_TOKEN>"}, "method": "PUT", "uri": "https://api.github.com/repos/adrianmoisey/temptest/issues/1/lock"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Status": "204 No Content", "X-RateLimit-Remaining": "4990", "X-GitHub-Media-Type": "github.the-key-preview; format=json", "X-Content-Type-Options": "nosniff", "Content-Security-Policy": "default-src 'none'", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "X-GitHub-Request-Id": "29550C5A:16022:165B0D6C:56C2E50D", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "Vary": "Accept-Encoding", "X-Served-By": "e183f7c661b1bbc2c987b3c4dc7b04e0", "Server": "GitHub.com", "X-XSS-Protection": "1; mode=block", "X-RateLimit-Limit": "5000", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Credentials": "true", "Date": "Tue, 16 Feb 2016 08:59:57 GMT", "X-Accepted-OAuth-Scopes": "public_repo, repo", "X-OAuth-Scopes": "repo", "X-Frame-Options": "deny", "X-RateLimit-Reset": "1455615772"}, "status": {"message": "No Content", "code": 204}, "url": "https://api.github.com/repos/adrianmoisey/temptest/issues/1/lock"}, "recorded_at": "2016-02-16T08:59:57"}], "recorded_with": "betamax/0.5.1"}
1+
{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0a4", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "token <AUTH_TOKEN>"}, "method": "GET", "uri": "https://api.github.com/repos/adrianmoisey/temptest/issues/1"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA+2WX2+bMBDAv4ufkzpA82eo6572DbqXTRMycCXWjG3Zho6hfPedDY0SVq0NqtSXPEU53/3u/4meNEaQlOyd0zallGl+U3G3b/KbQtXUgFaWstJwJmvFLXTUQa0dWEe5tQ1YGpEFCWrcKdNlc3FIESwHYWcTjgHRAdRTyWo4IBgzqUG690A/o5AK7TsxBxAS964Wk/RPevFqF3hJ0ije3e620ebTgsimzsGgaEEcdwKwywydNNYLeyJUxaWXnTQXnz1km2ySGAmsZY6ZaUOC0I5T4mmFkg5LEQamoYPxl/ZzgrTKjAyPJd77/6bNw86n7aKioPKjEkI9IWUa9PlY/+uIHi2PFC6rmRS07Klye8DaYUp+BCtuX5u/F4IKVj31PxkvPcdi7Q2UFwc22mFYTxIj6sNmB2CT28Jw7biSl1ftzBppylRM8j9sHg2tLULCNbk4w2CF1m9ZyxdKPZj1VBvesqLzpTFQAG+x2DORE3skuk77NfzmVxBLzx1krKz9Gj4yYeHwfANJ+uNn6LXz6kqDRHWhil+AaxRUcTmt5ZUEVJCNEAtSc4FXWcmj4Hiq/AUoDCCszJhDYLyKNstVtIzXD6tdmiTpevMdHTS6nOqsl9HqIYrS+DaNtl6nEMqOmMFtrsou84cLuXf6/muJSZV3VN+jcnhz8Nv7HB5G4en/kZh316M0vX7Xo3Q9SvjZ8sFH6fAXAs5S5CQKAAA=", "encoding": "utf-8"}, "headers": {"X-XSS-Protection": "1; mode=block", "Content-Security-Policy": "default-src 'none'", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "Transfer-Encoding": "chunked", "Last-Modified": "Sun, 12 Jun 2016 21:34:12 GMT", "Access-Control-Allow-Origin": "*", "X-Frame-Options": "deny", "Status": "200 OK", "X-Served-By": "c6c65e5196703428e7641f7d1e9bc353", "X-GitHub-Request-Id": "29474346:2193:EBAB87:576B77BF", "ETag": "W/\"1e13c11ac56c863bc72e173b8c0b46c1\"", "Date": "Thu, 23 Jun 2016 05:46:39 GMT", "X-RateLimit-Remaining": "4953", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "Server": "GitHub.com", "X-OAuth-Scopes": "repo", "X-GitHub-Media-Type": "github.v3; param=full; format=json", "X-Content-Type-Options": "nosniff", "Content-Encoding": "gzip", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "X-RateLimit-Limit": "5000", "Cache-Control": "private, max-age=60, s-maxage=60", "Content-Type": "application/json; charset=utf-8", "X-Accepted-OAuth-Scopes": "repo", "X-RateLimit-Reset": "1466661081"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/adrianmoisey/temptest/issues/1"}, "recorded_at": "2016-06-23T05:46:40"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Content-Length": "0", "Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0a4", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "token <AUTH_TOKEN>"}, "method": "PUT", "uri": "https://api.github.com/repos/adrianmoisey/temptest/issues/1/lock"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Status": "204 No Content", "X-RateLimit-Remaining": "4952", "X-GitHub-Media-Type": "github.v3; param=full; format=json", "Content-Security-Policy": "default-src 'none'", "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "X-Served-By": "a30e6f9aa7cf5731b87dfb3b9992202d", "X-GitHub-Request-Id": "29474346:2193:EBABCD:576B77BF", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "Vary": "Accept-Encoding", "X-XSS-Protection": "1; mode=block", "Server": "GitHub.com", "X-Content-Type-Options": "nosniff", "X-RateLimit-Limit": "5000", "Date": "Thu, 23 Jun 2016 05:46:39 GMT", "X-OAuth-Scopes": "repo", "X-Accepted-OAuth-Scopes": "public_repo, repo", "X-Frame-Options": "deny", "X-RateLimit-Reset": "1466661081"}, "status": {"message": "No Content", "code": 204}, "url": "https://api.github.com/repos/adrianmoisey/temptest/issues/1/lock"}, "recorded_at": "2016-06-23T05:46:40"}], "recorded_with": "betamax/0.7.1"}

tests/cassettes/Issue_unlock.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0a3", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "token <AUTH_TOKEN>"}, "method": "GET", "uri": "https://api.github.com/repos/adrianmoisey/temptest/issues/1"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA+2WzVLbMBCAX4XROUGxE0LwAH2J9tLSycjWYm+rH48kh7oe3r0rJ5jEMKXJMNMLp2Tl3U/7b3escYplrAqh9hnnosbzEkPV5OeF1dxBbT0X0qEw2qKHlgfQdQAfOHrfgOcJm7BeDYN17fpUHFGUyEH5kwmDQ3wL6rgRGh4JTJFoMOE90E8oosLmnZhbEBGroNUo/L1avFkFlCxL0tVidZksrybMNDoHR0cTFjAooCoLuqTx8bBjypZo4tlecelxhFzOl/OUCGIjgnDjgvSHftclkVZYEygVfcM0fGv8aXMzJ1rpdoyIZfH2v3VbhB1221FJIeV7q5R9IMrY6cO2fnkRHywHCpryRApZdtyGCih3FFJswRL9W/33ilO9Vcfjzxpl5HjKvQN5tGM7O3LrwZBHXT/ZPbDJfeGwDmjN8Vk7sCaadaUw+FucRiNrT5B+mxwdYW9F1v8ylq+kemvW8drhRhRtTI2DAnBDyT4RObInYmjrOIZf4ghS6jHAWkgdx/BeKA+PTzuQZd++97UOUd3WYEhd2eIn0BgF1wDNpvdYGqDnplFqwjQqWsrWDAfDpooLoHBALLkWgXjpLFlOZ8k0vfg8W2XzeXax/Er8ppZjnXSaLKPOYpWlV1GnUNbvMNtrcyvbddxbxL2ub69Rl2eFIudu7hho+wPv2Fm/fUjOpklGolDhWfCuIGF4+3gPwU8LafZfQqhFSS8apD3jeQ/ljSFJAk/uFws4r01J3AqwrCI6nZH0gDJUT4JQlCsSRO41Sqngjt1e8/qWIuoDCPArJmYn0r/o6nO4efuxMMeb+WNhfixM+qT6zwvz8Q8yRxaswAoAAA==", "encoding": "utf-8"}, "headers": {"X-XSS-Protection": "1; mode=block", "Content-Security-Policy": "default-src 'none'", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "Transfer-Encoding": "chunked", "Last-Modified": "Tue, 16 Feb 2016 08:48:29 GMT", "Access-Control-Allow-Origin": "*", "X-Frame-Options": "deny", "Status": "200 OK", "X-Served-By": "01d096e6cfe28f8aea352e988c332cd3", "X-GitHub-Request-Id": "29550C5A:14596:142CDE1E:56C2E55A", "X-RateLimit-Limit": "5000", "Cache-Control": "private, max-age=60, s-maxage=60", "Date": "Tue, 16 Feb 2016 09:01:15 GMT", "X-RateLimit-Remaining": "4987", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "Server": "GitHub.com", "X-OAuth-Scopes": "repo", "X-GitHub-Media-Type": "github.v3; param=full; format=json", "X-Content-Type-Options": "nosniff", "Content-Encoding": "gzip", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "ETag": "W/\"ca0fe4bdaad078cf95d3637e73abf569\"", "Access-Control-Allow-Credentials": "true", "Content-Type": "application/json; charset=utf-8", "X-Accepted-OAuth-Scopes": "repo", "X-RateLimit-Reset": "1455615772"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/adrianmoisey/temptest/issues/1"}, "recorded_at": "2016-02-16T09:01:15"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Content-Length": "0", "Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.the-key-preview+json", "User-Agent": "github3.py/1.0.0a3", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "token <AUTH_TOKEN>"}, "method": "DELETE", "uri": "https://api.github.com/repos/adrianmoisey/temptest/issues/1/lock"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Status": "204 No Content", "X-RateLimit-Remaining": "4986", "X-GitHub-Media-Type": "github.the-key-preview; format=json", "X-Content-Type-Options": "nosniff", "Content-Security-Policy": "default-src 'none'", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "X-GitHub-Request-Id": "29550C5A:14596:142CDEB6:56C2E55B", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "Vary": "Accept-Encoding", "X-Served-By": "8dd185e423974a7e13abbbe6e060031e", "Server": "GitHub.com", "X-XSS-Protection": "1; mode=block", "X-RateLimit-Limit": "5000", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Credentials": "true", "Date": "Tue, 16 Feb 2016 09:01:15 GMT", "X-Accepted-OAuth-Scopes": "public_repo, repo", "X-OAuth-Scopes": "repo", "X-Frame-Options": "deny", "X-RateLimit-Reset": "1455615772"}, "status": {"message": "No Content", "code": 204}, "url": "https://api.github.com/repos/adrianmoisey/temptest/issues/1/lock"}, "recorded_at": "2016-02-16T09:01:15"}], "recorded_with": "betamax/0.5.1"}
1+
{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0a4", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "token <AUTH_TOKEN>"}, "method": "GET", "uri": "https://api.github.com/repos/adrianmoisey/temptest/issues/1"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA+2WzW7bMAzH30XnpErixk2Nfpz2Bt1lwxDINusIkyVBot15Rt59lO0GiVusi1Fgl5yCUORPFD/+cMsqp1jCdojWJ5wLK68KibsqvcpMyR1Y47nInRS6NNJDwxFKi+CRS+8r8HzJZqxzk2hcs52KI4oSKSg/mXBIiPeglmtRwp7A9JISNH4G+hVFVKg/idmDiLjDUo2ef9SLD7sgc5YsV5vrzc0yvp0xXZUpODLNGEpUQF0WdEnlg7FlyhRSB9tRc+k4QG6iOFoRQdQChRs3pDP6YUoCLTMaqRTdwFS8D36s7yOiFW5gBCwLt/9t2gLsdNrOKgo5PxulzAtRxkmfjvXbi/gh8kCRuphIociWG9wB1Y6eFEawkP6j+XsnqS6q5eFnK/PA8VR7B/nZiQ1xlNaLpozabrM7YJX6zEmL0ujzq3YSTTTjCqHlbzGNRtGeIJ2anP3CLoqi/2Ut3yl1H9Zy62QtsiaUxkEGsqZiT0SO4omIjQ1r+DWsIJVeImxFXoY1fBbKw/5VA1ny/UfXawzuxoImd2Wyn0BrhK4C2k3vZaGBznWl1IyVUpEoG30wHJQqCEDmgFj5ViDxVotlPF8s56v102KTRFGyjr8Rv7L52Ceer6KnxTq5jpPoNvhkyvgB01+bmrzZBt0i7p19+JLTm/I7bh/IuTtD+BXu7A8G4/H/gZg2F00ai99Fky6aRF8t/1mT9n8Ao378KiMKAAA=", "encoding": "utf-8"}, "headers": {"X-XSS-Protection": "1; mode=block", "Content-Security-Policy": "default-src 'none'", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "Transfer-Encoding": "chunked", "Last-Modified": "Thu, 23 Jun 2016 05:46:39 GMT", "Access-Control-Allow-Origin": "*", "X-Frame-Options": "deny", "Status": "200 OK", "X-Served-By": "7b641bda7ec2ca7cd9df72d2578baf75", "X-GitHub-Request-Id": "29474346:2193:EBACA4:576B77C0", "ETag": "W/\"65df620c237afe134042db9930fab904\"", "Date": "Thu, 23 Jun 2016 05:46:41 GMT", "X-RateLimit-Remaining": "4951", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "Server": "GitHub.com", "X-OAuth-Scopes": "repo", "X-GitHub-Media-Type": "github.v3; param=full; format=json", "X-Content-Type-Options": "nosniff", "Content-Encoding": "gzip", "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "X-RateLimit-Limit": "5000", "Cache-Control": "private, max-age=60, s-maxage=60", "Content-Type": "application/json; charset=utf-8", "X-Accepted-OAuth-Scopes": "repo", "X-RateLimit-Reset": "1466661081"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/adrianmoisey/temptest/issues/1"}, "recorded_at": "2016-06-23T05:46:41"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Content-Length": "0", "Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0a4", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "token <AUTH_TOKEN>"}, "method": "DELETE", "uri": "https://api.github.com/repos/adrianmoisey/temptest/issues/1/lock"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Status": "204 No Content", "X-RateLimit-Remaining": "4950", "X-GitHub-Media-Type": "github.v3; param=full; format=json", "Content-Security-Policy": "default-src 'none'", "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval", "X-Served-By": "7f48e2f7761567e923121f17538d7a6d", "X-GitHub-Request-Id": "29474346:2193:EBACF0:576B77C1", "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload", "Vary": "Accept-Encoding", "X-XSS-Protection": "1; mode=block", "Server": "GitHub.com", "X-Content-Type-Options": "nosniff", "X-RateLimit-Limit": "5000", "Date": "Thu, 23 Jun 2016 05:46:41 GMT", "X-OAuth-Scopes": "repo", "X-Accepted-OAuth-Scopes": "public_repo, repo", "X-Frame-Options": "deny", "X-RateLimit-Reset": "1466661081"}, "status": {"message": "No Content", "code": 204}, "url": "https://api.github.com/repos/adrianmoisey/temptest/issues/1/lock"}, "recorded_at": "2016-06-23T05:46:41"}], "recorded_with": "betamax/0.7.1"}

tests/unit/test_issues_issue.py

-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ def test_create_lock(self):
162162

163163
self.session.put.assert_called_once_with(
164164
url_for('lock'),
165-
headers={'Accept': 'application/vnd.github.the-key-preview+json'}
166165
)
167166

168167
def test_comment_positive_id(self):
@@ -282,7 +281,6 @@ def test_remove_lock(self):
282281

283282
self.session.delete.assert_called_once_with(
284283
url_for('lock'),
285-
headers={'Accept': 'application/vnd.github.the-key-preview+json'}
286284
)
287285

288286
def test_reopen(self):

0 commit comments

Comments
 (0)