<reponame>iNerV/education-backend<filename>src/orders/tests/order_content_type_replacement/tests_order_item.py<gh_stars>100-1000
import pytest

pytestmark = [pytest.mark.django_db]


def test_order_without_items(order):
    order = order()

    assert order.item is None


def test_order_with_record(order, record):
    order = order(record=record)

    assert order.item == record


def test_order_with_course(order, course):
    order = order(course=course)

    assert order.item == course


def test_order_with_bundle(order, bundle):
    order = order(bundle=bundle)

    assert order.item == bundle

import pytest

pytestmark = [pytest.mark.django_db]


def test_order_without_items(order):
    order = order()

    assert order.item is None


def test_order_with_record(order, record):
    order = order(record=record)

    assert order.item == record


def test_order_with_course(order, course):
    order = order(course=course)

    assert order.item == course


def test_order_with_bundle(order, bundle):
    order = order(bundle=bundle)

    assert order.item == bundle