<s> """<STR_LIT>""" <EOL> from . . base_test import FlaskCorsTestCase , AppConfigTest <EOL> from flask import Flask <EOL> from flask_cors import * <EOL> from flask_cors . core import * <EOL> class ExposeHeadersTestCase ( FlaskCorsTestCase ) : <EOL> def setUp ( self ) : <EOL> self . app = Flask ( __name__ ) <EOL> @ self . app . route ( '<STR_LIT>' ) <EOL> @ cross_origin ( ) <EOL> def test_default ( ) : <EOL> return '<STR_LIT>' <EOL> @ self . app . route ( '<STR_LIT>' ) <EOL> @ cross_origin ( expose_headers = [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> def test_override ( ) : <EOL> return '<STR_LIT>' <EOL> def test_default ( self ) : <EOL> for resp in self . iter_responses ( '<STR_LIT>' , origin = '<STR_LIT>' ) : <EOL> self . assertTrue ( resp . headers . get ( ACL_EXPOSE_HEADERS ) is None , <EOL> "<STR_LIT>" ) <EOL> def test_override ( self ) : <EOL> '''<STR_LIT>''' <EOL> for resp in self . iter_responses ( '<STR_LIT>' , origin = '<STR_LIT>' ) : <EOL> self . assertEqual ( resp . headers . get ( ACL_EXPOSE_HEADERS ) , <EOL> '<STR_LIT>' ) <EOL> class AppConfigExposeHeadersTestCase ( AppConfigTest , ExposeHeadersTestCase ) : <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( AppConfigExposeHeadersTestCase , self ) . __init__ ( * args , ** kwargs ) <EOL> def test_default ( self ) : <EOL> @ self . app . route ( '<STR_LIT>' ) <EOL> @ cross_origin ( ) <EOL> def test_default ( ) : <EOL> return '<STR_LIT>' <EOL> super ( AppConfigExposeHeadersTestCase , self ) . test_default ( ) <EOL> def test_override ( self ) : <EOL> self . app . config [ '<STR_LIT>' ] = [ "<STR_LIT>" , <EOL> "<STR_LIT>" ] <EOL> @ self . app . route ( '<STR_LIT>' ) <EOL> @ cross_origin ( ) <EOL> def test_override ( ) : <EOL> return '<STR_LIT>' <EOL> super ( AppConfigExposeHeadersTestCase , self ) . test_override ( ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
