Repository: sigmavirus24/github3.py

Issue:
GitHub.emojis() return value contains ETag and Last-Modified entries
emojis() returns the return value of _json to the user, which then contains
confusing ETag and Last-Modified enttries, caused by commit 8c42a709. Not sure
how you want to fix it, but easiest would be to delete those entries in
emojis() before returning the result.

Discussion:

Patch:
diff --git a/github3/github.py b/github3/github.py
index e575408b..4f5d0734 100644
--- a/github3/github.py
+++ b/github3/github.py
@@ -355,7 +355,10 @@ class GitHub(GitHubCore):
                 }
         """
         url = self._build_url('emojis')
-        return self._json(self._get(url), 200)
+        data = self._json(self._get(url), 200)
+        del data['ETag']
+        del data['Last-Modified']
+        return data
 
     @requires_basic_auth
     def feeds(self):


Test patch:
diff --git a/tests/integration/test_github.py b/tests/integration/test_github.py
index d27eb229..fe2726be 100644
--- a/tests/integration/test_github.py
+++ b/tests/integration/test_github.py
@@ -95,6 +95,15 @@ class TestGitHub(IntegrationHelper):
         # Asserts that it's a string and looks ilke the URLs we expect to see
         assert emojis['+1'].startswith('https://github')
 
+    def test_emojis_etag(self):
+        """Test the ability to retrieve from /emojis."""
+        cassette_name = self.cassette_name('emojis')
+        with self.recorder.use_cassette(cassette_name):
+            emojis = self.gh.emojis()
+
+        assert 'ETag' not in emojis
+        assert 'Last-Modified' not in emojis
+
     def test_feeds(self):
         """Test the ability to retrieve a user's timelime URLs."""
         self.basic_login()