#NEWLINE# def test_mark_accepted( self ) : #NEWLINE# #INDENT# if ( INITIAL_INVITATIONS < 10 ) : #NEWLINE# #INDENT# i = 10 #NEWLINE# self . user ( ) . invitation_stats . add_available ( ( 10 - INITIAL_INVITATIONS ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# i = INITIAL_INVITATIONS #NEWLINE# #UNINDENT# self . user ( ) . invitation_stats . use ( i ) #NEWLINE# self . user ( ) . invitation_stats . mark_accepted ( ) #NEWLINE# self . assertEqual ( self . stats ( ) , ( i , i , 1 ) ) #NEWLINE# self . user ( ) . invitation_stats . mark_accepted ( 5 ) #NEWLINE# self . assertEqual ( self . stats ( ) , ( i , i , 6 ) ) #NEWLINE# self . assertRaises ( InvitationError , self . user ( ) . invitation_stats . mark_accepted , i ) #NEWLINE# self . user ( ) . invitation_stats . mark_accepted ( 4 ) #NEWLINE# self . assertEqual ( self . stats ( ) , ( i , self , 10 ) )