MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testLoggingWithoutAuthentication

Method testLoggingWithoutAuthentication

tests/Logging_.py:156–178  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

154 self.assertLogging("GET", url, requestHeaders, responseHeaders, output)
155
156 def testLoggingWithoutAuthentication(self):
157 self.assertEqual(github.Github().get_user("jacquev6").name, "Vincent Jacques")
158 url = "https://api.github.com/users/jacquev6"
159 requestHeaders = {"User-Agent": "PyGithub/Python"}
160 responseHeaders = {
161 "status": "200 OK",
162 "content-length": "628",
163 "x-github-media-type": "github.beta; format=json",
164 "x-content-type-options": "nosniff",
165 "x-ratelimit-limit": "5000",
166 "vary": "Accept",
167 "x-ratelimit-remaining": "4989",
168 "server": "nginx",
169 "last-modified": "Tue, 25 Sep 2012 07:42:42 GMT",
170 "connection": "keep-alive",
171 "etag": '"9bd085221a16b6d2ea95e72634c3c1ac"',
172 "cache-control": "public, max-age=60, s-maxage=60",
173 "date": "Tue, 25 Sep 2012 20:38:56 GMT",
174 "content-type": "application/json; charset=utf-8",
175 "DEBUG_FRAME": 0,
176 }
177 output = '{"type":"User","html_url":"https://github.com/jacquev6","login":"jacquev6","followers":14,"company":"Criteo","created_at":"2010-07-09T06:10:06Z","email":"vincent@vincent-jacques.net","hireable":false,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","public_gists":3,"bio":"","following":29,"name":"Vincent Jacques","blog":"http://vincent-jacques.net","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","id":327146,"public_repos":13,"location":"Paris, France","url":"https://api.github.com/users/jacquev6"}'
178 self.assertLogging("GET", url, requestHeaders, responseHeaders, output)
179
180 def testLoggingWithBaseUrl(self):
181 # ReplayData forged, not recorded

Callers

nothing calls this directly

Calls 2

assertLoggingMethod · 0.95
get_userMethod · 0.80

Tested by

no test coverage detected