@@ -260,7 +260,7 @@ def test_active_eaps(self):
260260 partners = [self .partner2 .id ],
261261 created_by = self .country_admin ,
262262 modified_by = self .country_admin ,
263- status = EAPStatus .ACTIVATED ,
263+ status = EAPStatus .APPROVED ,
264264 eap_type = EAPType .SIMPLIFIED_EAP ,
265265 )
266266 EAPRegistrationFactory .create (
@@ -1719,36 +1719,6 @@ def test_status_transition(self):
17191719 response = self .client .patch (url , update_data , format = "json" )
17201720 self .assertEqual (response .status_code , 400 )
17211721
1722- # NOTE: Transition to ACTIVATED
1723- # APPROVED -> ACTIVATED
1724- data = {
1725- "status" : EAPStatus .ACTIVATED ,
1726- }
1727-
1728- # LOGIN as country admin user
1729- # FAILS: As only ifrc admins or superuser can
1730- self .authenticate (self .country_admin )
1731- response = self .client .post (self .url , data , format = "json" )
1732- self .assertEqual (response .status_code , 400 )
1733-
1734- # LOGIN as IFRC admin user
1735- # SUCCESS: As only ifrc admins or superuser can
1736- self .assertIsNone (self .eap_registration .activated_at )
1737- self .authenticate (self .ifrc_admin_user )
1738- response = self .client .post (self .url , data , format = "json" )
1739- self .assertEqual (response .status_code , 200 )
1740- self .assertEqual (response .data ["status" ], EAPStatus .ACTIVATED )
1741- # Check is the activated timeline is added
1742- self .eap_registration .refresh_from_db ()
1743- self .assertIsNotNone (self .eap_registration .activated_at )
1744-
1745- # Check as if NS user cannot update after ACTIVATED
1746- # FAILS As simplified EAP is in ACTIVATED, cannot updated
1747- self .authenticate (self .country_admin )
1748- url = f"/api/v2/simplified-eap/{ simplified_eap .id } /"
1749- response = self .client .patch (url , update_data , format = "json" )
1750- self .assertEqual (response .status_code , 400 )
1751-
17521722 @mock .patch ("eap.serializers.generate_export_eap_pdf" )
17531723 @mock .patch ("eap.serializers.group" )
17541724 @mock .patch ("eap.serializers.send_new_eap_submission_email" )
@@ -2427,6 +2397,7 @@ def test_create_full_eap(self):
24272397 "total_budget" : 10000 ,
24282398 "objective" : "FUll eap objective" ,
24292399 "lead_time" : 5 ,
2400+ "lead_timeframe_unit" : TimeFrame .DAYS ,
24302401 "expected_submission_time" : "2024-12-31" ,
24312402 "readiness_budget" : 3000 ,
24322403 "pre_positioning_budget" : 4000 ,
0 commit comments