mirror of
https://github.com/sstent/go-garth.git
synced 2026-01-27 01:21:47 +00:00
working auth and activity list
This commit is contained in:
27
garth/tests/test_users.py
Normal file
27
garth/tests/test_users.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import pytest
|
||||
|
||||
from garth import UserProfile, UserSettings
|
||||
from garth.http import Client
|
||||
|
||||
|
||||
@pytest.mark.vcr
|
||||
def test_user_profile(authed_client: Client):
|
||||
profile = UserProfile.get(client=authed_client)
|
||||
assert profile.user_name
|
||||
|
||||
|
||||
@pytest.mark.vcr
|
||||
def test_user_settings(authed_client: Client):
|
||||
settings = UserSettings.get(client=authed_client)
|
||||
assert settings.user_data
|
||||
|
||||
|
||||
@pytest.mark.vcr
|
||||
def test_user_settings_sleep_windows(authed_client: Client):
|
||||
settings = UserSettings.get(client=authed_client)
|
||||
assert settings.user_data
|
||||
assert isinstance(settings.user_sleep_windows, list)
|
||||
for window in settings.user_sleep_windows:
|
||||
assert hasattr(window, "sleep_window_frequency")
|
||||
assert hasattr(window, "start_sleep_time_seconds_from_midnight")
|
||||
assert hasattr(window, "end_sleep_time_seconds_from_midnight")
|
||||
Reference in New Issue
Block a user