def test_get_quantity_allocated_without_allocation(variant_with_many_stocks):
    quantity_allocated = get_quantity_allocated(variant_with_many_stocks,
                                                COUNTRY_CODE)
    assert quantity_allocated == 0
def test_get_quantity_allocated_without_stock(variant_with_many_stocks):
    variant_with_many_stocks.stocks.all().delete()
    quantity_allocated = get_quantity_allocated(variant_with_many_stocks,
                                                COUNTRY_CODE)
    assert quantity_allocated == 0
def test_get_quantity_allocated(variant_with_many_stocks,
                                order_line_with_allocation_in_many_stocks):
    quantity_allocated = get_quantity_allocated(variant_with_many_stocks,
                                                COUNTRY_CODE)
    assert quantity_allocated == 3