Changed to show filament price if no spool price set and added tests
This commit is contained in:
@@ -185,3 +185,15 @@ def test_add_spool_both_used_and_remaining_weight(random_filament: dict[str, Any
|
||||
},
|
||||
)
|
||||
assert result.status_code == 400 # Cannot set both used and remaining weight
|
||||
|
||||
def test_add_spool_price(random_filament: dict[str, Any]):
|
||||
"""Test adding a spool to the database."""
|
||||
# Execute
|
||||
result = httpx.post(
|
||||
f"{URL}/api/v1/spool",
|
||||
json={
|
||||
"filament_id": random_filament["id"],
|
||||
"price": 25,
|
||||
},
|
||||
)
|
||||
assert result.status_code == 400 # Cannot set price
|
||||
Reference in New Issue
Block a user