@@ -53,12 +53,12 @@ def tearDown(self):
5353 @mock .patch ('api.channels_api.construct_specified_milestones_details' )
5454 def test__needs_default_first_notification_milestone__new_feature (self , mock_specified_milestones ):
5555 mock_specified_milestones .return_value = {
56- 99 : {
57- 'version' : 99 ,
56+ 99 : {
57+ 'version' : 99 ,
5858 'stable_date' : self .now .replace (year = self .now .year - 1 , day = 1 ).strftime (DATETIME_FORMAT )
5959 },
60- 100 : {
61- 'version' : 100 ,
60+ 100 : {
61+ 'version' : 100 ,
6262 'stable_date' : self .now .replace (year = self .now .year + 1 , day = 1 ).strftime (DATETIME_FORMAT )
6363 },
6464 }
@@ -124,7 +124,7 @@ def test__needs_default_first_notification_milestone__new_feature(self, mock_spe
124124
125125 @mock .patch ('api.channels_api.construct_specified_milestones_details' )
126126 def test__needs_default_first_notification_milestone__update (self , mock_specified_milestones ):
127-
127+
128128 mock_specified_milestones .return_value = {
129129 99 : {
130130 'version' : 99 ,
@@ -187,7 +187,7 @@ def test__needs_default_first_notification_milestone__update(self, mock_specifie
187187 self .assertFalse (needs_default_first_notification_milestone (
188188 self .normal_feature ,
189189 { 'enterprise_impact' : ENTERPRISE_IMPACT_LOW , 'first_enterprise_notification_milestone' : 100 }))
190-
190+
191191 # Breaking feature becoming normal feature missing the milestone
192192 self .assertFalse (needs_default_first_notification_milestone (
193193 self .breaking_feature , { 'enterprise_impact' : ENTERPRISE_IMPACT_NONE }))
@@ -223,19 +223,23 @@ def test__is_update_first_notification_milestone(self,
223223 'version' : 99 ,
224224 'stable_date' : self .now .replace (year = self .now .year - 1 , day = 1 ).strftime (DATETIME_FORMAT )
225225 },
226- 100 : {
226+ 100 : { # Current milestone on stable channel
227227 'version' : 100 ,
228- 'stable_date' : self .now .replace (year = self .now .year + 1 , day = 1 ).strftime (DATETIME_FORMAT )
228+ 'stable_date' : self .now .replace (year = self .now .year , day = 1 ).strftime (DATETIME_FORMAT )
229229 },
230230 101 : {
231231 'version' : 101 ,
232+ 'stable_date' : self .now .replace (year = self .now .year + 1 , day = 1 ).strftime (DATETIME_FORMAT )
233+ },
234+ 102 : {
235+ 'version' : 102 ,
232236 'stable_date' : self .now .replace (year = self .now .year + 2 , day = 1 ).strftime (DATETIME_FORMAT )
233237 },
234238 }
235239 mock_channel_details .return_value = {
236240 'beta' : {
237241 'version' : 100 ,
238- 'stable_date' : self .now .replace (year = self .now .year + 1 , day = 1 ).strftime (DATETIME_FORMAT )
242+ 'stable_date' : self .now .replace (year = self .now .year , day = 1 ).strftime (DATETIME_FORMAT )
239243 }
240244 }
241245
@@ -289,7 +293,7 @@ def test__is_update_first_notification_milestone(self,
289293 self .assertTrue (is_update_first_notification_milestone (
290294 self .normal_feature ,
291295 { 'enterprise_impact' : ENTERPRISE_IMPACT_LOW , 'first_enterprise_notification_milestone' : 100 }))
292-
296+
293297 # Breaking feature becoming normal feature missing the milestone
294298 self .assertFalse (is_update_first_notification_milestone (
295299 self .breaking_feature , { 'enterprise_impact' : ENTERPRISE_IMPACT_NONE }))
@@ -368,7 +372,7 @@ def test__should_remove_first_notice_milestone(self, mock_specified_milestones):
368372 'stable_date' : now .replace (year = now .year + 2 , day = 1 ).strftime (DATETIME_FORMAT )
369373 },
370374 }
371-
375+
372376 # Enterprise feature with no changes and no existing milestone
373377 self .assertFalse (should_remove_first_notice_milestone (self .enterprise_feature , {}))
374378
0 commit comments