#NEWLINE# def test_set_flavour_with_cookie_backend( self ) : #NEWLINE# #INDENT# original_FLAVOURS_STORAGE_BACKEND = settings . FLAVOURS_STORAGE_BACKEND #NEWLINE# try : #NEWLINE# #INDENT# settings . FLAVOURS_STORAGE_BACKEND = 'cookie' #NEWLINE# response = self . client . get ( '/' ) #NEWLINE# self . assertFalse ( ( settings . FLAVOURS_COOKIE_KEY in response . cookies ) ) #NEWLINE# response = self . client . get ( '/' , { #NEWLINE# #INDENT# settings . FLAVOURS_GET_PARAMETER : 'mobile' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( ( settings . FLAVOURS_COOKIE_KEY in response . cookies ) ) #NEWLINE# self . assertTrue ( response . cookies [ settings . FLAVOURS_COOKIE_KEY ] , 'mobile' ) #NEWLINE# self . assertContains ( response , 'Mobile!' ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# settings . FLAVOURS_STORAGE_BACKEND = original_FLAVOURS_STORAGE_BACKEND