#NEWLINE# @ pytest . mark . parametrize ( 'header, expected_filename' , [ ( 'attachment; filename=hello-WORLD_123.txt' , 'hello-WORLD_123.txt' ) , ( 'attachment; filename=".hello-WORLD_123.txt"' , 'hello-WORLD_123.txt' ) , ( 'attachment; filename="white space.txt"' , 'white space.txt' ) , ( 'attachment; filename="\\"quotes\\".txt"' , '"quotes".txt' ) , ( 'attachment; filename=/etc/hosts' , 'hosts' ) , ( 'attachment; filename=' , None ) ] ) #NEWLINE# def test_Content_Disposition_parsing( self , header , expected_filename ) : #NEWLINE# #INDENT# assert ( filename_from_content_disposition ( self ) == expected_filename )