def test_str(product: Product): assert_equal(product.name, str(product))
def test_create_product_status_code(resp): assert_equal(resp.status_code, 200)
def test_create(product: Product): assert_true(Product.objects.exists()) assert_equal(Product.objects.all().count(), 1)
def test_list_orders_status_code(resp): assert_equal(resp.status_code, 200)
def test_status_code(resp): assert_equal(resp.status_code, 200)
def test_list_products_status_code(resp): assert_equal(resp.status_code, 200)
def test_create_order_product(order_product: OrderProduct): assert_true(OrderProduct.objects.exists()) assert_equal(OrderProduct.objects.all().count(), 1)
def test_create_order(order: Order): assert_true(Order.objects.exists()) assert_equal(Order.objects.all().count(), 1)
def test_create_products(products): assert_equal(Product.objects.all().count(), 2)
def test_update_order_status_code(resp): assert_equal(resp.status_code, 200)