Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pydexcom/dexcom.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ def __init__(
self._session = requests.Session()
self._get_session()

@property
def username(self) -> str | None:
"""Get username."""
return self._username

@property
def account_id(self) -> str | None:
"""Get account ID."""
return self._account_id

def _post(
self,
endpoint: str,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_dexcom.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ def test_dexcom( # noqa: C901
)

if username is not None:
assert dexcom._username == USERNAME
assert dexcom.username == USERNAME
if account_id is not None:
assert dexcom._account_id == ACCOUNT_ID
assert dexcom._account_id in {ACCOUNT_ID, TEST_ACCOUNT_ID}
assert dexcom.account_id == ACCOUNT_ID
assert dexcom.account_id in {ACCOUNT_ID, TEST_ACCOUNT_ID}
assert dexcom._password == PASSWORD
assert dexcom._account_id != DEFAULT_UUID
assert dexcom.account_id != DEFAULT_UUID
assert UUID(dexcom._session_id)
assert dexcom._session_id != DEFAULT_UUID
return
Expand Down
Loading