def test_description_can_be_blank(product: Product): field = product._meta.get_field('description') assert_true(field.blank)
def test_create(product: Product): assert_true(Product.objects.exists()) assert_equal(Product.objects.all().count(), 1)
def test_create_order_product(order_product: OrderProduct): assert_true(OrderProduct.objects.exists()) assert_equal(OrderProduct.objects.all().count(), 1)
def test_profile_exists(user: User): exists = Profile.objects.filter(user__username=user.username).exists() assert_true(exists)
def test_create_order(order: Order): assert_true(Order.objects.exists()) assert_equal(Order.objects.all().count(), 1)