# 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.client_api.models import ClientApiTokenResponse


class TestModelRoundTrip:
    def test_client_api_token_response_round_trip(self):
        data = load_fixture("client_api_token_response.json")
        instance = ClientApiTokenResponse.from_dict(data)
        serialized = instance.to_dict()
        assert serialized == data
        restored = ClientApiTokenResponse.from_dict(serialized)
        assert restored.to_dict() == serialized

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