Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix test and reorganize attributes

Roland Geiderd6d841d75903
diff --git a/wger/manager/dataclasses.py b/wger/manager/dataclasses.py
index 0e7b8d619..9a0d42f8a 100644
--- a/wger/manager/dataclasses.py
+++ b/wger/manager/dataclasses.py
@@ -47,21 +47,23 @@ class SetConfigData:
exercise: int
weight: Decimal | int | None = None
+ max_weight: Decimal | int | None = None
+ weight_unit: int | None = 1
+ weight_rounding: Decimal | int | None = None
+
repetitions: Decimal | int | None = None
- rir: Decimal | int | None = None
- rest: int | None = None
+ max_repetitions: Decimal | int | None = None
+ repetitions_unit: int | None = 1
+ repetitions_rounding: Decimal | int | None = None
+ rir: Decimal | int | None = None
max_rir: Decimal | int | None = None
- max_weight: Decimal | int | None = None
- max_repetitions: Decimal | int | None = None
- max_rest: int | None = None
- max_sets: int | None = None
+
+ rest: Decimal | int | None = None
+ max_rest: Decimal | int | None = None
sets: int = 1
- weight_unit: int | None = 1
- repetitions_unit: int | None = 1
- weight_rounding: Decimal | int | None = None
- repetitions_rounding: Decimal | int | None = None
+ max_sets: int | None = None
comment: str = ''
type: str = 'normal'
diff --git a/wger/manager/tests/test_slot_entry.py b/wger/manager/tests/test_slot_entry.py
index 24667721b..dc346de18 100644
--- a/wger/manager/tests/test_slot_entry.py
+++ b/wger/manager/tests/test_slot_entry.py
@@ -315,10 +315,10 @@ class SlotEntryTestCase(WgerTestCase):
SetConfigData(
slot_entry_id=self.slot_entry.pk,
exercise=1,
- sets=1,
+ sets=5,
weight=Decimal(50),
weight_rounding=Decimal(2.5),
- rest=90,
+ rest=Decimal(90),
).__dict__,
)
@@ -331,7 +331,7 @@ class SlotEntryTestCase(WgerTestCase):
sets=6,
weight=Decimal(50),
weight_rounding=Decimal(2.5),
- rest=90,
+ rest=Decimal(90),
).__dict__,
)