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