import pytest

from stellar_sdk import (
    FeeBumpTransactionEnvelope,
    TransactionEnvelope,
    parse_transaction_envelope_from_xdr,
)


class TestHelpers:
    @pytest.mark.parametrize(
        "xdr, te_type",
        [
            (
                pytest.param(
                    "<KEY>
                    TransactionEnvelope,
                    id="TransactionEnvelopeV0",
                )
            ),
            (
                pytest.param(
                    "<KEY>
                    TransactionEnvelope,
                    id="TransactionEnvelopeV1",
                )
            ),
            (
                pytest.param(
                    "<KEY>
                    FeeBumpTransactionEnvelope,
                    id="FeeBumpTransactionEnvelope",
                )
            ),
        ],
    )
    def test_parse_transaction_envelope_from_xdr(self, xdr, te_type):
        te = parse_transaction_envelope_from_xdr(xdr, "")
        assert isinstance(te, te_type)

import pytest

from stellar_sdk import (
    FeeBumpTransactionEnvelope,
    TransactionEnvelope,
    parse_transaction_envelope_from_xdr,
)


class TestHelpers:
    @pytest.mark.parametrize(
        "xdr, te_type",
        [
            (
                pytest.param(
                    "<KEY>
                    TransactionEnvelope,
                    id="TransactionEnvelopeV0",
                )
            ),
            (
                pytest.param(
                    "<KEY>
                    TransactionEnvelope,
                    id="TransactionEnvelopeV1",
                )
            ),
            (
                pytest.param(
                    "<KEY>
                    FeeBumpTransactionEnvelope,
                    id="FeeBumpTransactionEnvelope",
                )
            ),
        ],
    )
    def test_parse_transaction_envelope_from_xdr(self, xdr, te_type):
        te = parse_transaction_envelope_from_xdr(xdr, "")
        assert isinstance(te, te_type)
