Added support for color_hex alpha channel

This commit is contained in:
Donkie
2023-08-12 21:32:20 +02:00
parent 6934748b14
commit 4cb2542a41
6 changed files with 69 additions and 8 deletions

View File

@@ -438,3 +438,23 @@ def test_update_filament_not_found():
assert "filament" in message
assert "id" in message
assert "123456789" in message
def test_add_filament_color_hex_alpha():
"""Test adding a filament with an alpha channel in the color hex."""
color_hex = "FF000088"
# Execute
result = httpx.post(
f"{URL}/api/v1/filament",
json={
"density": 1.25,
"diameter": 1.75,
"color_hex": color_hex,
},
)
result.raise_for_status()
# Verify
filament = result.json()
assert filament["color_hex"] == color_hex