@@ -351,6 +351,7 @@ def submit_existing(self, formats, change_authors=True, group_type='wg', stream_
351351 e .save ()
352352
353353 # make a discuss to see if the AD gets an email
354+ # TODO : this should only happen if the document stream is IETF
354355 ad = Person .objects .get (user__username = "ad" )
355356 ballot = create_ballot_if_not_open (None , draft , ad , 'approve' )
356357 ballot_position = BallotPositionDocEvent ()
@@ -362,6 +363,9 @@ def submit_existing(self, formats, change_authors=True, group_type='wg', stream_
362363 ballot_position .ad = ballot_position .by = Person .objects .get (user__username = "ad2" )
363364 ballot_position .save ()
364365
366+ # Set the revision needed tag
367+ draft .tags .add ("need-rev" )
368+
365369 name = draft .name
366370 rev = "%02d" % (int (draft .rev ) + 1 )
367371 group = draft .group
@@ -433,28 +437,36 @@ def submit_existing(self, formats, change_authors=True, group_type='wg', stream_
433437 docevents = list (draft .docevent_set .all ().order_by ("-time" , "-id" ))
434438 # Latest events are first (this is the default, but we make it explicit)
435439 # Assert event content in chronological order:
440+ self .assertEqual (docevents [5 ].type , "new_submission" )
441+ self .assertIn ("Uploaded new revision" , docevents [5 ].desc )
442+ self .assertEqual (docevents [5 ].by .name , "Submitter Name" )
443+ self .assertGreater (docevents [5 ].id , docevents [6 ].id )
444+ #
436445 self .assertEqual (docevents [4 ].type , "new_submission" )
437- self .assertIn ("Uploaded new revision " , docevents [4 ].desc )
438- self .assertEqual (docevents [4 ].by .name , "Submitter Name " )
446+ self .assertIn ("Request for posting confirmation " , docevents [4 ].desc )
447+ self .assertEqual (docevents [4 ].by .name , "(System) " )
439448 self .assertGreater (docevents [4 ].id , docevents [5 ].id )
440449 #
441450 self .assertEqual (docevents [3 ].type , "new_submission" )
442- self .assertIn ("Request for posting confirmation " , docevents [3 ].desc )
451+ self .assertIn ("New version approved " , docevents [3 ].desc )
443452 self .assertEqual (docevents [3 ].by .name , "(System)" )
444453 self .assertGreater (docevents [3 ].id , docevents [4 ].id )
445454 #
446- self .assertEqual (docevents [2 ].type , "new_submission " )
447- self .assertIn ("New version approved " , docevents [2 ].desc )
448- self .assertEqual (docevents [2 ].by .name , "(System) " )
455+ self .assertEqual (docevents [2 ].type , "new_revision " )
456+ self .assertIn ("New version available " , docevents [2 ].desc )
457+ self .assertEqual (docevents [2 ].by .name , "Submitter Name " )
449458 self .assertGreater (docevents [2 ].id , docevents [3 ].id )
450459 #
451- self .assertEqual (docevents [1 ].type , "new_revision " )
452- self .assertIn ("New version available " , docevents [1 ].desc )
453- self .assertEqual (docevents [1 ].by .name , "Submitter Name " )
460+ self .assertEqual (docevents [1 ].type , "changed_state " )
461+ self .assertIn ("IANA Review " , docevents [1 ].desc )
462+ self .assertEqual (docevents [1 ].by .name , "(System) " )
454463 self .assertGreater (docevents [1 ].id , docevents [2 ].id )
455464 #
456- self .assertEqual (docevents [0 ].type , "changed_state" )
457- self .assertIn ("IANA Review" , docevents [0 ].desc )
465+ self .assertEqual (docevents [0 ].type , "changed_document" )
466+ if draft .stream_id == 'ietf' :
467+ self .assertIn ("AD Followup" , docevents [0 ].desc )
468+ else :
469+ self .assertIn ("tag cleared" , docevents [0 ].desc )
458470 self .assertEqual (docevents [0 ].by .name , "(System)" )
459471 self .assertGreater (docevents [0 ].id , docevents [1 ].id )
460472 #
0 commit comments