fix(disputed): add disputed to TestState in test_entity.py
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
test_entity.py has its own TestState enum separate from domain/enums.py. Only domain/enums.py was updated, causing AttributeError when SQLAlchemy tried to map 'disputed' from DB to the test_entity.TestState class. Also adds disputed to VALID_TRANSITIONS so the entity can transition into and out of the disputed state.
This commit is contained in:
@@ -45,13 +45,15 @@ class TestState(str, enum.Enum):
|
|||||||
in_review = "in_review"
|
in_review = "in_review"
|
||||||
validated = "validated"
|
validated = "validated"
|
||||||
rejected = "rejected"
|
rejected = "rejected"
|
||||||
|
disputed = "disputed" # one lead approved, the other rejected
|
||||||
|
|
||||||
|
|
||||||
VALID_TRANSITIONS: dict[TestState, list[TestState]] = {
|
VALID_TRANSITIONS: dict[TestState, list[TestState]] = {
|
||||||
TestState.draft: [TestState.red_executing],
|
TestState.draft: [TestState.red_executing],
|
||||||
TestState.red_executing: [TestState.blue_evaluating],
|
TestState.red_executing: [TestState.blue_evaluating],
|
||||||
TestState.blue_evaluating: [TestState.in_review],
|
TestState.blue_evaluating: [TestState.in_review],
|
||||||
TestState.in_review: [TestState.validated, TestState.rejected],
|
TestState.in_review: [TestState.validated, TestState.rejected, TestState.disputed],
|
||||||
|
TestState.disputed: [TestState.validated, TestState.rejected],
|
||||||
TestState.rejected: [TestState.draft],
|
TestState.rejected: [TestState.draft],
|
||||||
TestState.validated: [],
|
TestState.validated: [],
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user