import pytest

from server.users.models import (
    Consumer,
    ConsumerProfile,
    Coordinator,
    CoordinatorProfile,
    Vendor,
    VendorProfile,
)

pytestmark = pytest.mark.django_db


def test_update_user_profile_signal():
    consumer = Consumer.objects.create(email="<EMAIL>")
    coordinator = Coordinator.objects.create(email="<EMAIL>")
    vendor = Vendor.objects.create(email="<EMAIL>")

    assert isinstance(consumer.profile, ConsumerProfile)
    assert isinstance(coordinator.profile, CoordinatorProfile)
    assert isinstance(vendor.profile, VendorProfile)

StarcoderdataPython