Exemplo n.º 1
0
 def test_if_file_view_not_set_uses_application_config_value_as_view(self):
     self.app.config['FILE_SYSTEM_STORAGE_FILE_VIEW'] = 'custom.file_view'
     storage = FileSystemStorage()
     called_url_for = (
         flexmock(flask_storage.filesystem)
         .should_receive('url_for')
         .once()
         .with_args('custom.file_view', filename='file_name')
     )
     storage.url('file_name')
     called_url_for.verify()