import pytest

from reconcile.utils.external_resource_spec import ExternalResourceSpec
from reconcile.utils.terrascript.cloudflare_resources import (
    UnsupportedCloudflareResourceError,
    create_cloudflare_terrascript_resource,
)


def create_external_resource_spec(provision_provider):
    return ExternalResourceSpec(
        provision_provider,
        {"name": "dev", "automationToken": {}},
        {
            "provider": provision_provider,
            "identifier": "test",
        },
        {},
    )


def test_create_cloudflare_terrascript_resource_unsupported():
    spec = create_external_resource_spec("doesntexist")

    with pytest.raises(UnsupportedCloudflareResourceError):
        create_cloudflare_terrascript_resource(spec)

0157a34de087767eb1af11b5e5e7e08c5b1759ff
<mask token>

<mask token>


def test_create_cloudflare_terrascript_resource_unsupported():
    spec = create_external_resource_spec('doesntexist')
    with pytest.raises(UnsupportedCloudflareResourceError):
        create_cloudflare_terrascript_resource(spec)

<mask token>


def create_external_resource_spec(provision_provider):
    return ExternalResourceSpec(provision_provider, {'name': 'dev',
        'automationToken': {}}, {'provider': provision_provider,
        'identifier': 'test'}, {})


def test_create_cloudflare_terrascript_resource_unsupported():
    spec = create_external_resource_spec('doesntexist')
    with pytest.raises(UnsupportedCloudflareResourceError):
        create_cloudflare_terrascript_resource(spec)

import pytest
from reconcile.utils.external_resource_spec import ExternalResourceSpec
from reconcile.utils.terrascript.cloudflare_resources import UnsupportedCloudflareResourceError, create_cloudflare_terrascript_resource


def create_external_resource_spec(provision_provider):
    return ExternalResourceSpec(provision_provider, {'name': 'dev',
        'automationToken': {}}, {'provider': provision_provider,
        'identifier': 'test'}, {})


def test_create_cloudflare_terrascript_resource_unsupported():
    spec = create_external_resource_spec('doesntexist')
    with pytest.raises(UnsupportedCloudflareResourceError):
        create_cloudflare_terrascript_resource(spec)

import pytest

from reconcile.utils.external_resource_spec import ExternalResourceSpec
from reconcile.utils.terrascript.cloudflare_resources import (
    UnsupportedCloudflareResourceError,
    create_cloudflare_terrascript_resource,
)


def create_external_resource_spec(provision_provider):
    return ExternalResourceSpec(
        provision_provider,
        {"name": "dev", "automationToken": {}},
        {
            "provider": provision_provider,
            "identifier": "test",
        },
        {},
    )


def test_create_cloudflare_terrascript_resource_unsupported():
    spec = create_external_resource_spec("doesntexist")

    with pytest.raises(UnsupportedCloudflareResourceError):
        create_cloudflare_terrascript_resource(spec)
