We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2f2a116 + 5945336 commit d53c0bdCopy full SHA for d53c0bd
1 file changed
libpythonpro_fls/tests/test_spam/test_buscar_avatar.py
@@ -0,0 +1,20 @@
1
+from unittest.mock import Mock
2
+
3
+from libpythonpro_fls import github_api
4
5
6
+def test_buscar_avatar():
7
+ resp_mock = Mock()
8
+ resp_mock.json.return_value = {
9
+ 'login': 'fabio1008', 'id': 83844802,
10
+ 'avatar_url': 'https://avatars.githubusercontent.com/u/83844802?v=4',
11
+ }
12
+ get_original=github_api.requests.get
13
+ github_api.requests.get = Mock(return_value=resp_mock)
14
+ url = github_api.buscar_avatar('fabio1008')
15
+ assert 'https://avatars.githubusercontent.com/u/83844802?v=4' == url
16
+ github_api.requests.get = get_original
17
18
+def test_buscar_avatar_integracao():
19
20
0 commit comments