<s> import base64 <EOL> import pytest <EOL> from webtest import TestApp <EOL> from . app import main <EOL> from pyramid_swagger . tween import SwaggerFormat <EOL> @ pytest . fixture <EOL> def settings ( ) : <EOL> dir_path = '<STR_LIT>' <EOL> return { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : dir_path , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : True , <EOL> } <EOL> @ pytest . fixture <EOL> def yaml_app ( ) : <EOL> return SwaggerFormat ( format = '<STR_LIT>' , <EOL> to_wire = base64 . b64encode , <EOL> to_python = base64 . b64decode , <EOL> validate = base64 . b64decode , <EOL> description = '<STR_LIT>' ) <EOL> def test_invalid_file_extension ( settings , yaml_app ) : <EOL> """<STR_LIT>""" <EOL> settings [ '<STR_LIT>' ] = [ '<STR_LIT>' ] <EOL> settings [ '<STR_LIT>' ] = [ yaml_app ] <EOL> with pytest . raises ( Exception ) : <EOL> TestApp ( main ( { } , ** settings ) ) </s>
