Skip to content

Commit

Permalink
[HOTFIX] Fix coverage and broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipe72 committed Nov 26, 2018
1 parent 4bf9163 commit a474213
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ before_install:
- sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- docker-compose build
- pip install coveralls

script:
- docker-compose up -d
- sleep 10
- docker-compose run worker coverage run -m unittest resources/testsYotube.py
- docker-compose run worker coverage report

after_success:
- cd worker
- coveralls

deploy:
- provider: heroku
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
- proxynet
depends_on:
- redis
environment:
- COVERALLS_REPO_TOKEN
env_file:
- .env
volumes:
Expand Down
2 changes: 2 additions & 0 deletions worker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ vine==1.1.4
requests
colorific
requests-mock
coverage
coveralls
10 changes: 5 additions & 5 deletions worker/resources/testsYotube.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ def test_requisicao_video_Yotube(self, request_mock):
request_mock.get(url, json=data_video)

data = {
'count_views': 907581,
'count_likes': 4067,
'count_dislikes': 1352,
'count_favorites': 0,
'count_comments': 466
'viewCount': 907581,
'likeCount': 4067,
'dislikeCount': 1352,
'favoriteCount': 0,
'commentCount': 466
}

video_data = self.youtube.get_video_youtube_data(id_video)
Expand Down

0 comments on commit a474213

Please sign in to comment.