@@ -33,7 +33,7 @@ def mock_prune_request(self):
3333 def mock_state_created (self ):
3434 state = MagicMock ()
3535 state .id = PydanticObjectId ()
36- state .status = StateStatusEnum .CREATED
36+ state .status = StateStatusEnum .QUEUED
3737 state .enqueue_after = 1234567890
3838 return state
3939
@@ -94,7 +94,7 @@ async def test_prune_signal_state_not_found(
9494 assert exc_info .value .detail == "State not found"
9595
9696 @patch ('app.controller.prune_signal.State' )
97- async def test_prune_signal_invalid_status_queued (
97+ async def test_prune_signal_invalid_status_created (
9898 self ,
9999 mock_state_class ,
100100 mock_namespace ,
@@ -105,7 +105,7 @@ async def test_prune_signal_invalid_status_queued(
105105 """Test when state is in QUEUED status (invalid for pruning)"""
106106 # Arrange
107107 mock_state = MagicMock ()
108- mock_state .status = StateStatusEnum .QUEUED
108+ mock_state .status = StateStatusEnum .CREATED
109109 mock_state_class .find_one = AsyncMock (return_value = mock_state )
110110
111111 # Act & Assert
@@ -118,7 +118,7 @@ async def test_prune_signal_invalid_status_queued(
118118 )
119119
120120 assert exc_info .value .status_code == status .HTTP_400_BAD_REQUEST
121- assert exc_info .value .detail == "State is not created "
121+ assert exc_info .value .detail == "State is not queued "
122122
123123 @patch ('app.controller.prune_signal.State' )
124124 async def test_prune_signal_invalid_status_executed (
@@ -145,7 +145,7 @@ async def test_prune_signal_invalid_status_executed(
145145 )
146146
147147 assert exc_info .value .status_code == status .HTTP_400_BAD_REQUEST
148- assert exc_info .value .detail == "State is not created "
148+ assert exc_info .value .detail == "State is not queued "
149149
150150 @patch ('app.controller.prune_signal.State' )
151151 async def test_prune_signal_invalid_status_errored (
@@ -172,7 +172,7 @@ async def test_prune_signal_invalid_status_errored(
172172 )
173173
174174 assert exc_info .value .status_code == status .HTTP_400_BAD_REQUEST
175- assert exc_info .value .detail == "State is not created "
175+ assert exc_info .value .detail == "State is not queued "
176176
177177 @patch ('app.controller.prune_signal.State' )
178178 async def test_prune_signal_invalid_status_pruned (
@@ -199,7 +199,7 @@ async def test_prune_signal_invalid_status_pruned(
199199 )
200200
201201 assert exc_info .value .status_code == status .HTTP_400_BAD_REQUEST
202- assert exc_info .value .detail == "State is not created "
202+ assert exc_info .value .detail == "State is not queued "
203203
204204 @patch ('app.controller.prune_signal.State' )
205205 async def test_prune_signal_database_error (
0 commit comments