Skip to content

Commit 901a0a1

Browse files
authored
Add basic test to test codecov (dropbox#221)
* Add basic test to test codecov * Fix linter error
1 parent 0ce9ba9 commit 901a0a1

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ language:
22
python
33
dist:
44
xenial
5+
os:
6+
linux
57
python:
68
- "2.7"
79
- "3.4"

codecov.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ coverage:
33
project:
44
default:
55
target: auto
6-
threshold: 0%
6+
threshold: 1%
77
base: auto
88
flags:
99
- unit

test/test_dropbox_unit.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Tests OAuth Flow
88
from dropbox import DropboxOAuth2Flow, session, Dropbox, create_session
9-
from dropbox.dropbox import BadInputException
9+
from dropbox.dropbox import BadInputException, DropboxTeam
1010
from dropbox.exceptions import AuthError
1111
from dropbox.oauth import OAuth2FlowNoRedirectResult, DropboxOAuth2FlowNoRedirect
1212
from datetime import datetime, timedelta
@@ -348,3 +348,11 @@ def test_check_refresh_with_invalid_grant(self, invalid_grant_session_instance):
348348
dbx.check_and_refresh_access_token()
349349
invalid_grant_session_instance.post.assert_called_once()
350350
assert e.error.is_invalid_access_token()
351+
352+
def test_team_client_refresh(self, session_instance):
353+
dbx = DropboxTeam(oauth2_refresh_token=REFRESH_TOKEN,
354+
app_key=APP_KEY,
355+
app_secret=APP_SECRET,
356+
session=session_instance)
357+
dbx.check_and_refresh_access_token()
358+
session_instance.post.assert_called_once()

0 commit comments

Comments
 (0)