* add some new endpoints for app v2 * add oauth * update EcoVacsHomeProducts - new attribute model * add some missing endpoints for app v2 * - use only one level subdomain urls on service list - add status * add new used subdomains (for europe) * improve docker images creation as requirements are change less often * reformat area list * add revoke expired oauths * add docker-compose example * wait for mqtt start fixes #107 * make images even smaller by copying only required folders instead of all (.git,...) * fix exception during logging * return fail if we can't get clean logs * improve docker docs. Thanks for the hit @Bustel * fix body not json serializable * add docker-compose example in separate folder
14 lines
355 B
Python
14 lines
355 B
Python
from bumper import OAuth
|
|
|
|
|
|
def test_oauth():
|
|
userId = "test"
|
|
o_auth = OAuth.create_new(userId)
|
|
assert o_auth is not None
|
|
assert o_auth.userId == userId
|
|
assert o_auth.access_token is not None
|
|
assert o_auth.expire_at is not None
|
|
assert o_auth.refresh_token is not None
|
|
|
|
data = o_auth.toResponse()
|
|
assert data is not None
|