Пример #1
0
def test_notify_get(withings_api: WithingsApi) -> None:
    """Test function."""
    responses_add_notify_get()

    response = withings_api.notify_get(callbackurl="http://localhost/callback")
    assert response == NotifyGetResponse(
        callbackurl="http://localhost/callback",
        appli=NotifyAppli.ACTIVITY,
        comment="comment1",
    )
Пример #2
0
def test_notify_get_unknown(withings_api: WithingsApi) -> None:
    """Test function."""
    responses_add_notify_get(_UNKNOWN_INT)

    response = withings_api.notify_get(callbackurl="http://localhost/callback")
    assert response == NotifyGetResponse(
        callbackurl="http://localhost/callback",
        appli=NotifyAppli.UNKNOWN,
        comment="comment1",
    )