8000 Remove ETag fields from emoji response, fixes #358 · pythonthings/github3.py@6db72c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6db72c4

Browse files
author
ekmartin
committed
Remove ETag fields from emoji response, fixes sigmavirus24#358
1 parent 47487d0 commit 6db72c4

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

github3/github.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,10 @@ def emojis(self):
355355
}
356356
"""
357357
url = self._build_url('emojis')
358-
return self._json(self._get(url), 200)
358+
data = self._json(self._get(url), 200)
359+
del data['ETag']
360+
del data['Last-Modified']
361+
return data
359362

360363
@requires_basic_auth
361364
def feeds(self):

tests/integration/test_github.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ def test_emojis(self):
9595
# Asserts that it's a string and looks ilke the URLs we expect to see
9696
assert emojis['+1'].startswith('https://github')
9797

98+
def test_emojis_etag(self):
99+
"""Test the ability to retrieve from /emojis."""
100+
cassette_name = self.cassette_name('emojis')
101+
with self.recorder.use_cassette(cassette_name):
102+
emojis = self.gh.emojis()
103+
104+
assert 'ETag' not in emojis
105+
assert 'Last-Modified' not in emojis
106+
98107
def test_feeds(self):
99108
"""Test the ability to retrieve a user's timelime URLs."""
100109
self.basic_login()

0 commit comments

Comments
 (0)
0