File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3699,25 +3699,9 @@ def test_draft_refs_identification(self):
36993699
37003700
37013701class PostSubmissionTests (BaseSubmitTestCase ):
3702- @override_settings (RFC_FILE_TYPES = ('txt' , 'xml' ), IDSUBMIT_FILE_TYPES = ('pdf' , 'md' ))
3703- def test_find_submission_filenames_rfc (self ):
3704- """Posting an RFC submission should use RFC_FILE_TYPES"""
3705- rfc = IndividualRfcFactory ()
3706- path = Path (self .staging_dir )
3707- for ext in ['txt' , 'xml' , 'pdf' , 'md' ]:
3708- (path / f'{ rfc .name } -{ rfc .rev } .{ ext } ' ).touch ()
3709- files = find_submission_filenames (rfc )
3710- self .assertCountEqual (
3711- files ,
3712- {
3713- 'txt' : f'{ path } /{ rfc .name } -{ rfc .rev } .txt' ,
3714- 'xml' : f'{ path } /{ rfc .name } -{ rfc .rev } .xml' ,
3715- # should NOT find the pdf or md
3716- }
3717- )
37183702
37193703 @override_settings (RFC_FILE_TYPES = ('txt' , 'xml' ), IDSUBMIT_FILE_TYPES = ('pdf' , 'md' ))
3720- def test_find_submission_filenames_draft (self ):
3704+ def test_find_submission_filenames (self ):
37213705 """Posting an I-D submission should use IDSUBMIT_FILE_TYPES"""
37223706 draft = WgDraftFactory ()
37233707 path = Path (self .staging_dir )
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ def find_submission_filenames(draft):
287287 """
288288 path = pathlib .Path (settings .IDSUBMIT_STAGING_PATH )
289289 stem = f'{ draft .name } -{ draft .rev } '
290- allowed_types = settings .RFC_FILE_TYPES if draft . get_state_slug () == 'rfc' else settings . IDSUBMIT_FILE_TYPES
290+ allowed_types = settings .IDSUBMIT_FILE_TYPES
291291 candidates = {ext : path / f'{ stem } .{ ext } ' for ext in allowed_types }
292292 return {ext : str (filename ) for ext , filename in candidates .items () if filename .exists ()}
293293
You can’t perform that action at this time.
0 commit comments