diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a1d493..633db38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +### v0.7.0 (2017-10-05) + + * New data.report.AccumulationReportGenerator to compute sums across projects, devices and/or streams + * Allow set_token to switch token_type + ### v0.6.5 (2017-09-10) * Fixes deployment issue diff --git a/iotile_cloud/api/connection.py b/iotile_cloud/api/connection.py index a5a84e1..44bc2a7 100644 --- a/iotile_cloud/api/connection.py +++ b/iotile_cloud/api/connection.py @@ -219,8 +219,10 @@ def __init__(self, domain=None, token_type=None): if token_type: self.token_type = token_type - def set_token(self, token): + def set_token(self, token, token_type=None): self.token = token + if token_type: + self.token_type = token_type def login(self, password, email): data = {'email': email, 'password': password} @@ -259,6 +261,7 @@ def refresh_token(self): :return: True if token was refreshed. False otherwise """ + assert self.token_type == DEFAULT_TOKEN_TYPE url = '{0}/{1}'.format(self.base_url, 'auth/api-jwt-refresh/') payload = json.dumps({'token': self.token}) diff --git a/requirements-build.txt b/requirements-build.txt index 5486025..b041c1f 100644 --- a/requirements-build.txt +++ b/requirements-build.txt @@ -1,3 +1,3 @@ pip twine -tox \ No newline at end of file +tox==2.6.0 diff --git a/requirements-test.txt b/requirements-test.txt index e354316..ac292dc 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,6 +1,6 @@ -pytest -unittest2 +pytest==3.0.6 +unittest2==1.1 coverage==3.7.1 -coveralls -mock -requests-mock +coveralls==1.1 +mock==2.0.0 +requests-mock==1.3.0 diff --git a/version.py b/version.py index 770ec3e..fac7172 100644 --- a/version.py +++ b/version.py @@ -1,2 +1,2 @@ -version = '0.6.5' +version = '0.7.0'