<s> from __future__ import unicode_literals <EOL> from . . import BaseProvider <EOL> from . . lorem . la import Provider as WordProvider <EOL> class Provider ( BaseProvider ) : <EOL> application_mime_types = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT:application/json>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> audio_mime_types = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> image_mime_types = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> message_mime_types = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> model_mime_types = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> multipart_mime_types = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> text_mime_types = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> video_mime_types = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> mime_types = { <EOL> '<STR_LIT>' : application_mime_types , <EOL> '<STR_LIT>' : audio_mime_types , <EOL> '<STR_LIT:image>' : image_mime_types , <EOL> '<STR_LIT:message>' : message_mime_types , <EOL> '<STR_LIT>' : model_mime_types , <EOL> '<STR_LIT>' : multipart_mime_types , <EOL> '<STR_LIT:text>' : text_mime_types , <EOL> '<STR_LIT>' : video_mime_types <EOL> } <EOL> audio_file_extenstions = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> image_file_extenstions = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> text_file_extensions = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT:html>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> video_file_extensions = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> office_file_extensions = ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT:key>" , <EOL> "<STR_LIT>" , <EOL> ) <EOL> file_extensions = { <EOL> "<STR_LIT>" : audio_file_extenstions , <EOL> "<STR_LIT:image>" : image_file_extenstions , <EOL> "<STR_LIT>" : office_file_extensions , <EOL> "<STR_LIT:text>" : text_file_extensions , <EOL> "<STR_LIT>" : video_file_extensions , <EOL> } <EOL> @ classmethod <EOL> def mime_type ( cls , category = None ) : <EOL> """<STR_LIT>""" <EOL> category = category if category else cls . random_element ( list ( cls . mime_types . keys ( ) ) ) <EOL> return cls . random_element ( cls . mime_types [ category ] ) <EOL> @ classmethod <EOL> def file_name ( cls , category = None , extension = None ) : <EOL> """<STR_LIT>""" <EOL> extension = extension if extension else cls . file_extension ( category ) <EOL> filename = WordProvider . word ( ) <EOL> return '<STR_LIT>' . format ( filename , extension ) <EOL> @ classmethod <EOL> def file_extension ( cls , category = None ) : <EOL> """<STR_LIT>""" <EOL> category = category if category else cls . random_element ( list ( cls . file_extensions . keys ( ) ) ) <EOL> return cls . random_element ( cls . file_extensions [ category ] ) </s>
