@@ -267,9 +267,15 @@ def text_submit_new_wg_xml(self):
267267 def text_submit_new_wg_txt_xml (self ):
268268 self .submit_new_wg (["txt" , "xml" ])
269269
270- def submit_existing (self , formats , change_authors = True ):
270+ def submit_existing (self , formats , change_authors = True , group_type = 'wg' , stream_type = 'ietf' ):
271271 # submit new revision of existing -> supply submitter info -> prev authors confirm
272272 draft = make_test_data ()
273+ if not group_type == 'wg' :
274+ draft .group .type_id = group_type
275+ draft .group .save ()
276+ if not stream_type == 'ietf' :
277+ draft .stream_id = stream_type
278+ draft .save_with_history ([DocEvent .objects .create (doc = draft , type = "added_comment" , by = Person .objects .get (user__username = "secretary" ), desc = "Test" )])
273279 if not change_authors :
274280 draft .documentauthor_set .all ().delete ()
275281 ensure_person_email_info_exists ('Author Name' ,'author@example.com' )
@@ -333,7 +339,15 @@ def submit_existing(self, formats, change_authors=True):
333339 if change_authors :
334340 # Since authors changed, ensure chairs are copied (and that the message says why)
335341 self .assertTrue ("chairs have been copied" in unicode (confirm_email ))
336- self .assertTrue ("mars-chairs@" in confirm_email ["To" ].lower ())
342+ if group_type in ['wg' ,'rg' ,'ag' ]:
343+ self .assertTrue ("mars-chairs@" in confirm_email ["To" ].lower ())
344+ elif group_type == 'area' :
345+ self .assertTrue ("aread@" in confirm_email ["To" ].lower ())
346+ else :
347+ pass
348+ if stream_type not in 'ietf' :
349+ if stream_type == 'ise' :
350+ self .assertTrue ("rfc-ise@" in confirm_email ["To" ].lower ())
337351 else :
338352 self .assertTrue ("chairs have been copied" not in unicode (confirm_email ))
339353 self .assertTrue ("mars-chairs@" not in confirm_email ["To" ].lower ())
@@ -366,8 +380,9 @@ def submit_existing(self, formats, change_authors=True):
366380 self .assertTrue (not os .path .exists (os .path .join (self .staging_dir , u"%s-%s.txt" % (name , rev ))))
367381 self .assertTrue (os .path .exists (os .path .join (self .repository_dir , u"%s-%s.txt" % (name , rev ))))
368382 self .assertEqual (draft .type_id , "draft" )
369- self .assertEqual (draft .stream_id , "ietf" )
370- self .assertEqual (draft .get_state_slug ("draft-stream-%s" % draft .stream_id ), "wg-doc" )
383+ if stream_type == 'ietf' :
384+ self .assertEqual (draft .stream_id , "ietf" )
385+ self .assertEqual (draft .get_state_slug ("draft-stream-%s" % draft .stream_id ), "wg-doc" )
371386 self .assertEqual (draft .get_state_slug ("draft-iana-review" ), "changed" )
372387 self .assertEqual (draft .authors .count (), 1 )
373388 self .assertEqual (draft .authors .all ()[0 ].get_name (), "Author Name" )
@@ -398,6 +413,18 @@ def test_submit_existing_txt_xml(self):
398413 def test_submit_existing_txt_preserve_authors (self ):
399414 self .submit_existing (["txt" ],change_authors = False )
400415
416+ def test_submit_existing_rg (self ):
417+ self .submit_existing (["txt" ],group_type = 'rg' )
418+
419+ def test_submit_existing_ag (self ):
420+ self .submit_existing (["txt" ],group_type = 'ag' )
421+
422+ def test_submit_existing_area (self ):
423+ self .submit_existing (["txt" ],group_type = 'area' )
424+
425+ def test_submit_existing_ise (self ):
426+ self .submit_existing (["txt" ],stream_type = 'ise' )
427+
401428 def submit_new_individual (self , formats ):
402429 # submit new -> supply submitter info -> confirm
403430 draft = make_test_data ()
0 commit comments