# This file is auto-generated by oagen. Do not edit.

"""Model round-trip tests: from_dict(to_dict()) preserves data."""

from tests.generated_helpers import load_fixture

from workos.widgets.models import WidgetSessionTokenResponse


class TestModelRoundTrip:
    def test_widget_session_token_response_round_trip(self):
        data = load_fixture("widget_session_token_response.json")
        instance = WidgetSessionTokenResponse.from_dict(data)
        serialized = instance.to_dict()
        assert serialized == data
        restored = WidgetSessionTokenResponse.from_dict(serialized)
        assert restored.to_dict() == serialized

    def test_widget_session_token_response_minimal_payload(self):
        data = {"token": "eyJhbGciOiJSUzI1NiIsImtpZCI6InNlc3Npb24..."}
        instance = WidgetSessionTokenResponse.from_dict(data)
        serialized = instance.to_dict()
        assert serialized["token"] == data["token"]
