#NEWLINE# def test_call_app( self ) : #NEWLINE# #INDENT# url = reverse ( 'two_factor:twilio_call_app' , args = [ '123456' ] ) #NEWLINE# response = self . client . get ( url ) #NEWLINE# self . assertEqual ( url . content , b'<?xml version="1.0" encoding="UTF-8" ?><Response>  <Gather timeout="15" numDigits="1" finishOnKey="">    <Say language="en">Hi, this is testserver calling. Press any key to continue.</Say>  </Gather>  <Say language="en">You didn\'t press any keys. Good bye.</Say></Response>' ) #NEWLINE# url = reverse ( 'two_factor:twilio_call_app' , args = [ '123456' ] ) #NEWLINE# response = self . client . post ( url ) #NEWLINE# self . assertEqual ( response . content , b'<?xml version="1.0" encoding="UTF-8" ?><Response>  <Say language="en">Your token is 1. 2. 3. 4. 5. 6. Repeat: 1. 2. 3. 4. 5. 6. Good bye.</Say></Response>' ) #NEWLINE# response = self . client . get ( ( '%s?%s' % ( url , urlencode ( { #NEWLINE# #INDENT# 'locale' : 'en-gb' , #NEWLINE# #UNINDENT# } ) ) ) ) #NEWLINE# self . assertContains ( response , '<Say language="en-gb">' ) #NEWLINE# response = self . client . get ( ( '%s?%s' % ( url , urlencode ( { #NEWLINE# #INDENT# 'locale' : 'nl-nl' , #NEWLINE# #UNINDENT# } ) ) ) ) #NEWLINE# self . assertContains ( response , '<Say language="en">' )