Esempio n. 1
0
def test_create_invalid_total_value():
    with pytest.raises(ValueError):
        inventory.Resource('name', 'manu', -10, 0)
Esempio n. 2
0
def test_create_invalid_allocated_value(total, allocated):
    with pytest.raises(ValueError):
        inventory.Resource('name', 'manu', total, allocated)
Esempio n. 3
0
def test_create_invalid_total_type():
    with pytest.raises(TypeError):
        inventory.Resource('Parrot', 'Pirates A-Hoy', 10.5, 5)
Esempio n. 4
0
def test_create_invalid_allocated_type():
    with pytest.raises(TypeError):
        inventory.Resource('name', 'manu', 10, 2.5)
Esempio n. 5
0
def resource(resource_values):
    return inventory.Resource(**resource_values)
Esempio n. 6
0
def test_create_invalid_total_type():
    with pytest.raises(TypeError):
        inventory.Resource('name', 'manu', 10.5, 100)
Esempio n. 7
0
def test_create_invalid_total_value():
	with pytest.raises(ValueError):
		resource = inventory.Resource("name", "manu", -10, 0)
Esempio n. 8
0
def test_create_invalid_allocated_type():
	with pytest.raises(TypeError):
		resource = inventory.Resource("name", "manu", 10, 2.5)
Esempio n. 9
0
def test_create_invalid_total_type():
	with pytest.raises(TypeError):
		resource = inventory.Resource("Parrot", "Pirate A-Hoy", 10.5, 5)