Skip to content

Commit 76ef0e5

Browse files
committed
Rename test file.
1 parent 81e972f commit 76ef0e5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/views/test_unicorn_dataclass.py renamed to tests/views/test_unicorn_set_property_value.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,25 @@
77
@dataclass
88
class InventoryItem:
99
"""Class for keeping track of an item in inventory."""
10+
1011
name: str
1112
unit_price: float
1213
quantity_on_hand: int = 0
1314

1415

15-
class NestedPropertyView(UnicornView):
16+
class PropertyView(UnicornView):
1617
inventory = InventoryItem("Hammer", 20)
1718

1819

1920
def test_set_property_value_dataclass():
20-
component = NestedPropertyView(component_name="test", component_id="12345678")
21+
component = PropertyView(component_name="test", component_id="12345678")
2122
assert InventoryItem("Hammer", 20) == component.inventory
2223

2324
_set_property_value(
24-
component, "inventory",
25+
component,
26+
"inventory",
2527
InventoryItem("Hammer", 20, 1),
26-
{"inventory": InventoryItem("Hammer", 20, 1)}
28+
{"inventory": InventoryItem("Hammer", 20, 1)},
2729
)
2830

2931
assert InventoryItem("Hammer", 20, 1) == component.inventory

0 commit comments

Comments
 (0)