def test_wrapper_update_function(self):
		self.sh.rewrite(
			{
				'CSP':{'default-src':['none']},
				'HPKP':{'pins':[{'sha256':'test123'}]}
			}
		)
		@self.app.route('/')
		@self.sh.wrapper(
			{
				'CSP':{'script-src':['self','code.jquery.com']},
				'X_Permitted_Cross_Domain_Policies':{'value':'none'},
				'X-XSS-Protection':{'value':1,'mode':False},
				'HPKP':{'pins':[{'sha256':'test2256'}]},
			}
		)
		def index(): return "hi"
		with self.app.test_client() as c:
			result = c.get('/')
			self.assertEquals(result.headers.get('X-Permitted-Cross-Domain-Policies'),'none')
			self.assertEquals(result.headers.get('Content-Security-Policy'),"script-src 'self' code.jquery.com; default-src 'none'")
			self.assertEquals(result.headers.get('X-XSS-Protection'),'1')
			self.assertEquals(result.headers.get('Public-Key-Pins'),"pin-sha256=test2256; pin-sha256=test123")
		@self.app.route('/test')
		@self.sh.wrapper({'CSP':{'script-src':['nonce-1234']}})
		def test(): return "hi"
		with self.app.test_client() as c:
			result = c.get('/test')
			self.assertEquals(result.headers.get('Content-Security-Policy'),"script-src 'self' code.jquery.com 'nonce-1234'; default-src 'none'")
Save a video to disk
dataset/ETHPy150Open twaldear/flask-secure-headers/flask_secure_headers/tests/core_test.py/TestAppUseCase.test_wrapper_update_function--crossover with--dataset/ETHPy150Open brycedrennan/eulerian-magnification/eularian_magnification/base.py/save_video