fix(): fixed bugs with cache invalidation, notifications and guardrails

This commit is contained in:
ITQ
2026-02-24 13:16:29 +03:00
parent b27254e2fb
commit 7bf3ccee5c
14 changed files with 290 additions and 82 deletions
@@ -349,6 +349,26 @@ class RejectAndReqChangesTest(TestCase):
exp = experiment_reopen(experiment=exp, user=self.experimenter)
self.assertEqual(exp.status, ExperimentStatus.DRAFT)
def test_unauthorized_reject_raises(self) -> None:
outsider = make_approver("_rr_out")
with self.assertRaises(ValidationError) as ctx:
experiment_reject(
experiment=self.exp,
user=outsider,
comment="nope",
)
self.assertIn("user", ctx.exception.message_dict)
def test_unauthorized_request_changes_raises(self) -> None:
outsider = make_approver("_rr_rc")
with self.assertRaises(ValidationError) as ctx:
experiment_request_changes(
experiment=self.exp,
user=outsider,
comment="nope",
)
self.assertIn("user", ctx.exception.message_dict)
class LifecycleFlowTest(TestCase):
@override