import pytest from dmp.api.shopify.schemas import ShopifyStoreConnectionInput from tests.unit.faker import FakerTyped @pytest.mark.parametrize( "url, shop_domain", [ ("example.com", "example.com"), ("example.myshopify.com", "example.myshopify.com"), ("example.myshopify.com/merch/vinyl-123", "example.myshopify.com"), ("https://example.myshopify.co.uk", "example.myshopify.co.uk"), ("https://example.myshopify.com", "example.myshopify.com"), ("tps://example.myshopify.com", "example.myshopify.com"), ], ) def test_shopify_store_connection_input( url: str, shop_domain: str, fake: FakerTyped ) -> None: model = ShopifyStoreConnectionInput( vendorId=fake.integer(), subaccountId=fake.integer(), globalParticipantId=fake.uuid4_string(), shopDomain=url, redirectUri=fake.url(), # type: ignore ) assert model.shop_domain == shop_domain