<s> """<STR_LIT>""" <EOL> from django . test import SimpleTestCase , TestCase , override_settings <EOL> @ override_settings ( <EOL> ROOT_URLCONF = '<STR_LIT>' , <EOL> TEMPLATES = [ { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : [ <EOL> '<STR_LIT>' , <EOL> ] , <EOL> } , <EOL> } ] , <EOL> ) <EOL> class RequestContextProcessorTests ( SimpleTestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_request_attributes ( self ) : <EOL> """<STR_LIT>""" <EOL> url = '<STR_LIT>' <EOL> response = self . client . get ( url ) <EOL> self . assertContains ( response , '<STR_LIT>' ) <EOL> response = self . client . get ( url ) <EOL> self . assertContains ( response , '<STR_LIT>' ) <EOL> response = self . client . get ( url , { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> self . assertContains ( response , '<STR_LIT>' ) <EOL> response = self . client . post ( url , { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> self . assertContains ( response , '<STR_LIT>' ) <EOL> response = self . client . get ( url ) <EOL> self . assertContains ( response , url ) <EOL> response = self . client . get ( url , { '<STR_LIT:path>' : '<STR_LIT>' } ) <EOL> self . assertContains ( response , url ) <EOL> response = self . client . post ( url , { '<STR_LIT:path>' : '<STR_LIT>' } ) <EOL> self . assertContains ( response , url ) <EOL> @ override_settings ( <EOL> DEBUG = True , <EOL> INTERNAL_IPS = [ '<STR_LIT:127.0.0.1>' ] , <EOL> ROOT_URLCONF = '<STR_LIT>' , <EOL> TEMPLATES = [ { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : [ <EOL> '<STR_LIT>' , <EOL> ] , <EOL> } , <EOL> } ] , <EOL> ) <EOL> class DebugContextProcessorTests ( TestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_debug ( self ) : <EOL> url = '<STR_LIT>' <EOL> response = self . client . get ( url ) <EOL> self . assertContains ( response , '<STR_LIT>' ) <EOL> with override_settings ( DEBUG = False ) : <EOL> response = self . client . get ( url ) <EOL> self . assertNotContains ( response , '<STR_LIT>' ) <EOL> def test_sql_queries ( self ) : <EOL> """<STR_LIT>""" <EOL> url = '<STR_LIT>' <EOL> response = self . client . get ( url ) <EOL> self . assertContains ( response , '<STR_LIT>' ) <EOL> self . assertContains ( response , '<STR_LIT>' ) <EOL> self . assertContains ( response , '<STR_LIT>' ) <EOL> self . assertContains ( response , '<STR_LIT>' ) </s>
