File: test_authentication_tokens.py

package info (click to toggle)
python-nice-go 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 608 kB
  • sloc: python: 1,981; makefile: 3
file content (12 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
from nice_go._authentication_tokens import AuthenticationTokens


async def test_authentication_tokens() -> None:
    data = {"IdToken": "test_token", "RefreshToken": "refresh_token"}
    tokens = AuthenticationTokens(data)
    assert tokens.id_token == "test_token"
    assert tokens.refresh_token == "refresh_token"
    data = {"IdToken": "test_token"}
    tokens = AuthenticationTokens(data)
    assert tokens.id_token == "test_token"
    assert tokens.refresh_token is None