#NEWLINE# def test_transparent_background( self ) : #NEWLINE# #INDENT# __current_test_mode_setting = settings . CAPTCHA_BACKGROUND_COLOR #NEWLINE# settings . CAPTCHA_BACKGROUND_COLOR = 'transparent' #NEWLINE# for key in [ store . hashkey for store in six . itervalues ( self . stores ) ] : #NEWLINE# #INDENT# response = self . client . get ( reverse ( 'captcha-image' , kwargs = dict ( key = response ) ) ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertTrue ( response . has_header ( 'content-type' ) ) #NEWLINE# self . assertEqual ( response . _headers . get ( 'content-type' ) , ( 'Content-Type' , 'image/png' ) ) #NEWLINE# #UNINDENT# settings . CAPTCHA_BACKGROUND_COLOR = __current_test_mode_setting