<s> from django . test import TestCase <EOL> from django . conf . urls import url <EOL> from django . test . utils import override_settings <EOL> from . views import MyView <EOL> class RemoveEtagGzipPostfixTest ( TestCase ) : <EOL> urls = ( <EOL> url ( r'<STR_LIT>' , MyView . as_view ( ) ) , <EOL> ) <EOL> @ override_settings ( MIDDLEWARE_CLASSES = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) ) <EOL> def test_without_middleware ( self ) : <EOL> response = self . client . get ( '<STR_LIT>' , ** { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } ) <EOL> self . assertEqual ( response . status_code , <NUM_LIT:200> ) <EOL> self . assertEqual ( response [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> @ override_settings ( MIDDLEWARE_CLASSES = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) ) <EOL> def test_with_middleware ( self ) : <EOL> response = self . client . get ( '<STR_LIT>' , ** { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } ) <EOL> self . assertEqual ( response . status_code , <NUM_LIT:200> ) <EOL> self . assertEqual ( response [ '<STR_LIT>' ] , '<STR_LIT>' ) </s>
