fix(domain): reject duplicate report participants
This commit is contained in:
1 parent
f106d706e4
commit
9dbf98fee1
4 files changed
+16
No files matched your search
@@ -93,6 +93,15 @@ class CalculationTests(unittest.TestCase):
|
||||
with self.assertRaisesRegex(ValueError, "не более 100 ресурсов"):
|
||||
InspectionReport("Белка", 1, "дупло", 1, tuple(("вьюнок", 1) for _ in range(101)))
|
||||
|
||||
def test_sessions_reject_duplicate_participant_ids(self):
|
||||
with self.assertRaisesRegex(ValueError, "не должны повторяться"):
|
||||
CoachingSession(
|
||||
"15.08", "ЛУ", "11:00", "12:00", "Белка", 1, "Первый", 2,
|
||||
extra_kittens=(("Дубль", 2, "самостоятельно"),),
|
||||
)
|
||||
with self.assertRaisesRegex(ValueError, "разными персонажами"):
|
||||
TrainingSession("Белка", 1, "Белка", 1)
|
||||
|
||||
def test_zu_rejects_non_self_kitten(self):
|
||||
with self.assertRaisesRegex(ValueError, "Для ЗУ все котята должны быть самостоятельными"):
|
||||
CoachingSession(
|
||||
|
||||
Reference in new issue
Block a user