Skip to content

Commit d87a74a

Browse files
install pytest-mock
1 parent 96a0ece commit d87a74a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ python:
55
install:
66
- pip install -q -r requirements-dev.txt
77
script:
8-
-flake8
8+
-flake8
9+
-pytest libpythonpro

libpythonpro/tests/test_spam/test_github_api.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
@pytest.fixture
99
def avatar_url(mocker):
1010
resp_mock = Mock()
11-
url = 'https://avatars3.githubusercontent.com/u/402714?v=4'
11+
url = 'https://avatars.githubusercontent.com/u/102936883?v=4'
1212
resp_mock.json.return_value = {
13-
'login': 'renzo', 'id': 402714,
13+
'login': 'GuilhermeePires', 'id': 102936883,
1414
'avatar_url': url,
1515
}
1616
get_mock = mocker.patch('libpythonpro.github_api.requests.get')
@@ -19,10 +19,10 @@ def avatar_url(mocker):
1919

2020

2121
def test_buscar_avatar(avatar_url):
22-
url = github_api.buscar_avatar('renzo')
22+
url = github_api.buscar_avatar('GuilhermeePires')
2323
assert avatar_url == url
2424

2525

2626
def test_buscar_avatar_integracao():
27-
url = github_api.buscar_avatar('renzon')
28-
assert 'https://avatars3.githubusercontent.com/u/3457115?v=4' == url
27+
url = github_api.buscar_avatar('GuilhermeePires')
28+
assert 'https://avatars.githubusercontent.com/u/102936883?v=4' == url

0 commit comments

Comments
 (0)