MCPcopy
hub / github.com/gitcoinco/web / test_get_github_user_data

Method test_get_github_user_data

app/git/tests/test_utils.py:133–140  ·  view source on GitHub ↗

Test the github utility get_github_user_data method.

(self)

Source from the content-addressed store, hash-verified

131
132 @responses.activate
133 def test_get_github_user_data(self):
134 """Test the github utility get_github_user_data method."""
135 headers = dict({'Authorization': f'token {self.user_oauth_token}'}, **JSON_HEADER)
136 data = {'login': 'gitcoin'}
137 responses.add(responses.GET, 'https://api.github.com/user', json=data, headers=headers, status=200)
138 result = get_github_user_data(self.user_oauth_token)
139
140 assert result == data
141
142 @responses.activate
143 def test_get_github_user_data_failure(self):

Callers

nothing calls this directly

Calls 2

get_github_user_dataFunction · 0.90
addMethod · 0.80

Tested by

no test coverage detected