Пример #1
0
def test_get_pack_breakdown_qty_string():
    with pytest.raises(TypeError):
        get_pack_breakdown([3, 5], "10")
Пример #2
0
def test_get_pack_breakdown_qty_empty():
    with pytest.raises(TypeError):
        get_pack_breakdown([3, 5], None)
Пример #3
0
def test_get_pack_breakdown_input_empty():
    assert get_pack_breakdown([], 10) == {}
Пример #4
0
def test_get_pack_breakdown_input_invalid():
    assert get_pack_breakdown("invalid", "10") == {}
Пример #5
0
def test_get_pack_breakdown():
    expected_output = {5: 2}
    assert (
        get_pack_breakdown(BakeryProducts.PRODUCTS["VS5"].keys(), 10) == expected_output
    )