#NEWLINE# @ admins_add_fixtures #NEWLINE# def test_admins_add_flashes_on_NoSuchUserError( make_admin ) : #NEWLINE# #INDENT# make_admin . side_effect = accounts . NoSuchUserError #NEWLINE# request = DummyRequest ( params = { #NEWLINE# #INDENT# 'add' : 'seanh' , #NEWLINE# #UNINDENT# } ) #NEWLINE# request . session . flash = Mock ( ) #NEWLINE# views . admins_add ( make_admin ) #NEWLINE# assert ( request . session . flash . call_count == 1 )